Mem Leak in RSAObj.pas + add option to load cert form string

Type TRSACore = class ...
public
...
Destructor Destroy; reintroduce; overload;
end;

...
Destructor TRSACore.Destroy;
begin
FSHA2.Free;
inherited;
end;

TRSAEncSign in Encrypt method creates Core: TRSACore; but when Freeing it it does not call TRSACore.Destroy causing a mem leak every time Encrypt is executed.

  1. There is no method to load a certificate from string. I need to save Certificate to disk then LOAD it from disk, or modify your source what I do not want to do.
    There is TRSAEncSign .FromPublicKeyFile(...)
    Please add TRSAEncSign.FromPublicKeyString(...)

Please Fix 1) and add 2) ASAP

Thanks for spotting the memory leak. It can be fixed by changing the Destroy description:
Destructor Destroy; override;

Regarding the loading of a cert from a string, I assume you just want the base64 string, not the 'BEGIN /END' sequences.

Correct?

I have my cert in string in form
-------BEGIN ...

-------END

Yes I changed reintroduce to override and mem leak is gone.
This solution is ok for a short period of time for Dev purposes but in production I need whole library pack corrected.

OK, will add the method and issue a new version

thank you :)