You are not logged in.
I found a problem and it took me a whole day. When using the encryption functions. The mormot.crypt.rsa unit must be used.
Otherwise, the output of some functions is nil and causes problems. For example:
CryptCipher := Decrypt('aes-256-gcm', Pointer(Lkey));
Seems, in the intialziation section of the mormot.crypt.rsa unit, some classes are created and initialized.
Last edited by anouri (2025-01-18 09:44:09)
Offline
I have identified the location of the error in the source below.
https://gist.github.com/a-nouri/cb11785 … c11425d05c
And I call it :
procedure TForm1.Button1Click(Sender: TObject);
var
MyCryptAndHash: TMyCryptAndHash;
Enc: string;
begin
MyCryptAndHash := TMyCryptAndHash.Create;
Enc := MyCryptAndHash.AESEncrypt('111', '01234567890123456789012345678912');
MyCryptAndHash.Free;
end;
After adding mormot.crypt.rsa to the uses section, the problem is solved.
In mormot.crypt.secure function Cipher return nil. Function can't resolve algoname because it is not initilized
Last edited by anouri (2025-01-19 08:58:07)
Offline