Home > Back-end >  How to use DELPHI XE10 HMAC SHA256? (can use yesterday, today to restart memory error 00000000), the
How to use DELPHI XE10 HMAC SHA256? (can use yesterday, today to restart memory error 00000000), the

Time:02-01

USES the
IdHMACSHA1 IDHASHSHA, IDHMAC IDGLOBAL, IdSSLOpenSSL,
IdIOHandler IdIOHandlerSocket, IdIOHandlerStack IdSSL;

(procedure TForm1. Button2Click (Sender: TObject);

Var
Hmac: TIdHMACSHA256;
Hash: TIdBytes;
Ss: string;
The begin
LoadOpenSSLLibrary;
//if NOT TIDHASHSHA256. IsAvailable then
//raise Exception. Create (' SHA256 HASING IS NOT AVAILABEL! ');
Hmac:=TIdHMACSHA256. Create;
TRY
Hmac. Key:=IndyTextEncoding_UTF8. GetBytes (EDIT3. Text);
Hash:=hmac HashValue (IndyTextEncoding_UTF8 GetBytes (EDIT7. Text));
EDIT6. Text:=ToHex (hash);
The finally
Hmac. Free;
end;
END;)

CodePudding user response:



Proper execution of ah, there are no mistakes, you enter debug mode to see an error code lines,

CodePudding user response:

CodePudding user response:

Can you write a package for me? Is to restart the computer after the error, is very depressed! QQ: 467415082
  • Related