I am trying to convert an old project which was originally done using TurboPower LockBox 3.7 on Delphi 10 to use TurboPack LockBox 3 2021.11 (from GetIt Package Manager) on Delphi 11.
My orginal code was:
Hash1.HashString(edit1.Text);
if Stream_to_Base64(Hash1.HashOutputValue)='AbkShI/vdJjy6jhNAtbcGA==' then
begin
// stuff here
end;
where Hash1 is a THash component.
The HashString procedure now has a TEncoding element which was not required before. Would changing the first line to the following be correct?
Hash1.HashString(edit1.Text,TEncoding.Default);
More importantly (I think) the second line now gives the error
E2010 Incompatible types: 'string' and 'System.TArray<System.Byte>'
How do I compare the HashOutputValue with an existing string in the new version?