Hi
I am new to encryption and I am not quite sure how to use TXCeedEncryption with Delphi 7.
Specifically, I am trying to build and retreive a pair of keys for the RSA Encryption method.
procedure TForm1.btnMakeKeysClick(Sender: TObject);
var f: TextFile;
RSA: DXceedRSAEncryptionMethod;
seed,v: Olevariant;
begin
RSA:= CoXceedRSAEncryptionMethod.Create;
seed:= null;
RSA.SetRandomKeyPair(1024,seed);
xCry.EncryptionMethod:= RSA;
assignfile(f,’C:\Privkey.txt’);
rewrite(f);
v:= RSA.Get_Privatekey;
writeln(f,xCry.ToString(v));
closefile(F);
assignfile(f,’C:\Publickey.txt’);
rewrite(f);
v:= RSA.Get_Publickey;
writeln(f,xCry.ToString(v));
closefile(F);
end;
Is this right ?
I don’t think the resulting text-files look like keys. Am I doing something wrong ?
René, SSV aps, DK
Imported from legacy forums. Posted by Rene (had 3703 views)