1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

LibCrypto: Allow callers to pass exponent to RSA::generate_key_pair

This commit is contained in:
Andrew Kaster 2024-03-08 15:36:02 -07:00 committed by Andrew Kaster
parent 0b4858e589
commit 139ff3552c

View file

@ -98,10 +98,10 @@ public:
using KeyPairType = RSAKeyPair<PublicKeyType, PrivateKeyType>; using KeyPairType = RSAKeyPair<PublicKeyType, PrivateKeyType>;
static KeyPairType parse_rsa_key(ReadonlyBytes der); static KeyPairType parse_rsa_key(ReadonlyBytes der);
static KeyPairType generate_key_pair(size_t bits = 256) static KeyPairType generate_key_pair(size_t bits = 256, IntegerType e = 65537)
{ {
IntegerType e { 65537 }; // :P IntegerType p;
IntegerType p, q; IntegerType q;
IntegerType lambda; IntegerType lambda;
do { do {