RSA Key Class¶
-
class
securefile.keyset.RSA_KEY(public, private)¶ Rivest–Shamir–Adleman (RSA) Algorithm key object.
Method: Attributes: - public_key
- private_key
-
__init__(public, private)¶ Initlize the class
Parameters: Returns: None
Raises: None
-
static
genrate(prime_one, prime_two)¶ @staticmethod
Genrate a public key and private key pair from a given prime numberi
Example
print(RSA_KEY.genrate(149, 383))
Parameters: Returns: RSA_KEYpublic and private key pair objectRaises: - ValueError – Both numbers must be prime.
- ValueError – p and q cannot be equal in RSA key