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.
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(...)
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.