ownca.crypto package
Submodules
ownca.crypto.cert module
ownca.crypto.keys module
Copyright (c) 2020 Kairo de Araujo
- class ownca.crypto.keys.OwncaKeyData(key_data)[source]
Bases:
object
Generates Ownca Key Data Structure
- Parameters
key_data (dict) –
Key Data
{ "key": cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey, "key_bytes": bytes, "public_key": cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey, "public_key_bytes": bytes, }
- Returns
OwncaKeyData
- Return type
ownca.crypto.keys.OwncaKeyData
- Raises
OwnCAInvalidDataStructure
- property key
Method to get the key
- Returns
key
- Return type
cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey
- property key_bytes
Method to get the key in
bytes
- Returns
key
- Return type
bytes
- property public_key
Method to get the public key
- Returns
key
- Return type
cryptography.hazmat.backends.openssl.rsa._RSAPublicKey
- property public_key_bytes
Method to get the public key in
bytes
- Returns
public key
- Return type
bytes
- ownca.crypto.keys.generate(public_exponent=65537, key_size=2048)[source]
Generates Private and Public keys
- Parameters
public_exponent (int, optional, Default: 65537) – Public Exponent
key_size (int, optional, Default: 2048) – Key size
- Returns
Ownca Key Data Structure
- Return type
ownca.crypto.keys.OwncaKeyData