Save new private key when it generated

This commit is contained in:
Double Sine 2018-08-14 20:40:24 +08:00
parent c7e5eab364
commit fdc727ca72
No known key found for this signature in database
GPG Key ID: 44460E4F43EA8633

View File

@ -115,6 +115,8 @@ int _tmain(int argc, TCHAR* argv[]) {
do { do {
cipher->GenerateKey(2048); cipher->GenerateKey(2048);
} while (patcher::Solution0::CheckKey(cipher) && patcher::Solution1::CheckKey(cipher)); } while (patcher::Solution0::CheckKey(cipher) && patcher::Solution1::CheckKey(cipher));
cipher->ExportKeyToFile<RSACipher::KeyType::PrivateKey, RSACipher::KeyFormat::PEM>("RegPrivateKey.pem");
_tprintf_s(TEXT("New RSA private key has been saved to RegPrivateKey.pem.\n"));
} }
// ------------------ // ------------------