bobocep.dist.crypto.aes.BoboDistributedCryptoAES
- class bobocep.dist.crypto.aes.BoboDistributedCryptoAES(aes_key: str, nonce_length: int = 16, mac_length: int = 16)[source]
Bases:
bobocep.dist.crypto.crypto.BoboDistributedCryptoAES encryption in GCM mode. Data are encrypted using either AES-128, AES-192, or AES-256 encryption.
- __init__(aes_key: str, nonce_length: int = 16, mac_length: int = 16)[source]
- Parameters
aes_key – The AES key to use for encryption.
nonce_length – The nonce length.
mac_length – The MAC length.
- decrypt(msg_bytes: bytes) str[source]
- Parameters
msg_bytes – Incoming bytes.
- Returns
Incoming JSON string with other data from transit.