luxon.utils.rsa.
RSAKey
[source]¶Utility class to work with RSA keys.
decrypt
(message)[source]¶Method to decrypt a message with the private Key.
Parameters: | message (str) – message encrypted wit the public key. |
---|---|
Returns: | Unicode encoded decrypted message. |
encrypt
(message)[source]¶Method to encrypt a message with the public Key.
Parameters: | message (str) – Cleartext message to be encrypted. |
---|---|
Returns: | base64 encoded encrypted message. |
generate_private_key
(bits=4096, password=None)[source]¶Method to generate a private RSA key.
Parameters: |
|
---|---|
Returns: | Unicode encoded private key. |
load_pem_key
(pem_key, password=None)[source]¶Method to load the key from string.
Parameters: |
|
---|
load_pem_key_file
(file, password=None)[source]¶Method to load the key from string.
Parameters: |
|
---|
public_key
¶Property to return the unicode encoded RSA public key