标签:style io os ar strong for sp cti on
XE6 MD5 加密算法
Delphi
function MD5(const texto: string): string; var idmd5: TIdHashMessageDigest5; begin idmd5 := TIdHashMessageDigest5.Create; try result := idmd5.HashStringAsHex(texto); finally idmd5.Free; end; end;
c++builder
#include <IdHashMessageDigest.hpp>
String __fastcall MD5(const String texto)
{
String result;
TIdHashMessageDigest5 *idmd5= new TIdHashMessageDigest5();
try
{
result= idmd5->HashStringAsHex(texto);
}
__finally
{
delete idmd5;
}
return result;
}标签:style io os ar strong for sp cti on
原文地址:http://www.cnblogs.com/cb168/p/3976795.html