pylibressl.cipher.noauth¶
Module Contents¶
Classes¶
Base symmetric cipher class (without AE). |
|
AES 256-bit cipher in CTR (counter) mode. |
|
AES 256-bit cipher in CBC (cipher block chaining) mode. |
|
GOST R 28147-89 256-bit cipher in CTR (counter) mode. |
- class pylibressl.cipher.noauth.BaseCipherNoauth(key, iv)¶
Bases:
pylibressl.cipher.cipher.BaseCipherBase symmetric cipher class (without AE).
- _init_cipher_ctx(self, is_encrypt)¶
Initialise cipher context.
Should return cipher context cdata. It should be ready to do EVP_CipherUpdate.
- encrypt(self, data)¶
Encrypt a message.
- Parameters
data – data to encrypt as a byte string
- Returns
encrypted message
- decrypt(self, data)¶
Decrypt a message.
- Parameters
data – data to encrypt as a byte string
- Returns
decrypted message
- class pylibressl.cipher.noauth.AES256_CTR(key, iv)¶
Bases:
BaseCipherNoauthAES 256-bit cipher in CTR (counter) mode.
- _CIPHER_ID¶
- _MODE¶
- class pylibressl.cipher.noauth.AES256_CBC(key, iv)¶
Bases:
BaseCipherNoauthAES 256-bit cipher in CBC (cipher block chaining) mode.
- _CIPHER_ID¶
- _MODE¶
- class pylibressl.cipher.noauth.GOST89_CTR(key, iv)¶
Bases:
BaseCipherNoauthGOST R 28147-89 256-bit cipher in CTR (counter) mode.
- _CIPHER_ID¶
- _MODE¶