create keys with the same object that we sign/verify; not instantiating encrypt/decrypt objects saves ~100k stripped
This commit is contained in:
@@ -58,12 +58,12 @@ void CryptManager::GenerateRSAKey( unsigned int keyLength, CString privFilename,
|
|||||||
{
|
{
|
||||||
AutoSeededRandomPool rng;
|
AutoSeededRandomPool rng;
|
||||||
|
|
||||||
RSAES_OAEP_SHA_Decryptor priv(rng, keyLength);
|
RSASSA_PKCS1v15_SHA_Signer priv(rng, keyLength);
|
||||||
RageFileSink privFile(privFilename);
|
RageFileSink privFile(privFilename);
|
||||||
priv.DEREncode(privFile);
|
priv.DEREncode(privFile);
|
||||||
privFile.MessageEnd();
|
privFile.MessageEnd();
|
||||||
|
|
||||||
RSAES_OAEP_SHA_Encryptor pub(priv);
|
RSASSA_PKCS1v15_SHA_Verifier pub(priv);
|
||||||
RageFileSink pubFile(pubFilename);
|
RageFileSink pubFile(pubFilename);
|
||||||
pub.DEREncode(pubFile);
|
pub.DEREncode(pubFile);
|
||||||
pubFile.MessageEnd();
|
pubFile.MessageEnd();
|
||||||
|
|||||||
Reference in New Issue
Block a user