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/

posted on 2013-08-28 12:58  东睿软件工作室  阅读(1619)  评论(0编辑  收藏  举报