Commit fe40bd7b by Michael Brachmann

fix

parent 9ccbd1b7
...@@ -84,8 +84,12 @@ begin ...@@ -84,8 +84,12 @@ begin
end; end;
function SHA256Bytes(const AData: TBytes): TBytes; function SHA256Bytes(const AData: TBytes): TBytes;
var
Hash: THashSHA2;
begin begin
Result := THashSHA2.GetHashBytes(AData); Hash := THashSHA2.Create(SHA256);
Hash.Update(AData);
Result := Hash.HashAsBytes;
end; end;
function HMACSHA256Bytes(const AKey, AData: TBytes): TBytes; function HMACSHA256Bytes(const AKey, AData: TBytes): TBytes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment