delphi自带的SHA1算法 uses IdHashSHA, IdGlobal; function SHA1(Input: String): String; begin with TIdHashSHA1.Create do try Result := LowerCase(HashBytesAsHex(TidBytes(Bytesof(Input)))); finally Free; end; end;
参考<SHA-1 hash for LoadRunner>: http://ptfrontline.wordpress.com/2010/03/02/sha-1-hash-for-loadrunner/ 包含SHA1算法的头文件sha1.h: /* ***************************************************************************** * * March 2010 * * Small changes by Kim Sa
(转载)http://neil-yang.iteye.com/blog/703470 /* * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined * in FIPS PUB 180-1 * Version 2.1a Copyright Paul Johnston 2000 - 2002. * Other contributors: Greg Holt, Andrew Kepert, Ydnar,