XE6 MD5 加密算法Delphifunction 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; }
时间: 2024-10-26 09:55:44