TIdHMACSHA256.TIdHMACSHA384.TIdHMACSHA512 do not work in Delphi
delphi, indy
Solution
Quickly looking at Indy 10 sources, they don't have coded SHA256-512r hashes, and use some kind of system hashes (??). Please check TIdHashSHA256.IsAvailable - most likely it will return false.
Problem
Why HashValue function of TIdHMACSHA256+ (Indy/delphi) always return empty? For example, the code below does not work. ``` var Hash: TIdHMACSHA256 ; HashValue: TBytes; begin SetCurrentDir(ExtractFilePath(ParamStr(0))); Hash := TIdHMACSHA256 .Create; try Hash.Key := TEncoding.ASCII.GetBytes('devaee2'); HashValue := Hash.HashValue(TFile.ReadAllBytes('menu.xml')); // HashValue is an empty array, why? Tag := Length(HashValue); TFile.WriteAllBytes('menu.xml.hash', HashValue); finally FreeAndNil(Hash); end; end; ```