sorry, that was a little bit to fast now it works function TSNMPRec.Pass2Key(const Value: AnsiString): AnsiString; var key: AnsiString; begin case FAuthMode of AuthMD5: begin if FAuthPassKey = '' then begin key := MD5LongHash(Value, 1048576); FAuthPassKey := key; end else key := FAuthPassKey; Result := MD5(key + FAuthEngineID + key); end; AuthSHA1: begin if FAuthPassKey = '' then begin key := SHA1LongHash(Value, 1048576); FAuthPassKey := key; end else key := FAuthPassKey; Result := SHA1(key + FAuthEngineID + key); end; else Result := ''; end; end;
greetings peter > Hi again, > > i checked it quickly and it works > > i changed in the pass2key function the following lines > > if FAuthKey = '' then > key := MD5LongHash(Value, 1048576) > else > key := FAuthKey; > > on the first request i save the result of > keyForThisDevice := snmp.Reply.AuthKey; > and use it on the next > snmp.Query.AuthKey := keyForThisDevice; > > this modification reduce the request time from 70ms to 7ms and less > > greetings > peter > > > >> Hi everybody, >> >> i found a little problem in snmpsend, everthink works find just very slow >> one snmp request takes 70 ms, that sound not much, but i checked it with >> wireshark >> and the agent need to answer 1 ms >> >> i found out that in synacode in the function MD5LongHash >> the line >> MDUpdate(MDContext, Value, @MD5Transform); >> will be executed 131072 times with the password testtest >> and this consumes all the time >> >> do someone know a better solution to calculate the MD5LongHash ? >> >> or is it possible to save the result from pass2key and use it on the >> next request of the same device ? >> >> thanks in advance >> peter >> >> > ------------------------------------------------------------------------------ Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/ _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public