当前位置:   article > 正文

HMACSHA512算法!

tidhmacsha512

function EncryptHMACSha512(Input, AKey: String): String;
  var
    SHA512    : TIdHMACSHA512;
    tmp:String;
  begin
    SHA512:=TIdHMACSHA512.Create;
    try
      SHA512.Key:=TIdDecoderMIME.DecodeBytes(AKey);
      Result:=TIdEncoderMIME.EncodeBytes(SHA512.HashValue(bytesof(Input)));
    finally
      SHA512.Free;
    end;
end;

 结果与此网址一致:http://caligatio.github.io/jsSHA/

转载于:https://www.cnblogs.com/prtmon/p/3286961.html

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/730809
推荐阅读
相关标签
  

闽ICP备14008679号