ciphers package

Submodules

ciphers.cipher module

Base wrapper for cipher derivatives

class ciphers.cipher.Decryptor(cipher_params={}, arg_params={}, **kwargs: dict)[source]

Bases: object

BaseClass template for Decryptor class inherited by CipherSuites. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

decrypt(cipher_text: str)[source]

Template method for decryption of a cipher text

Parameters

cipher_text – input message for decryption

:type str :returns: decryption output access/modification :rtype str

class ciphers.cipher.Encryptor(cipher_params: dict, arg_params: dict, **kwargs: dict)[source]

Bases: object

BaseClass template for Encryptor class inherited by CipherSuites. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

encrypt(plain_text: str)[source]

Template method for encryption of a single message

Parameters

plain_text – input message for encryption

:type str :returns: encrypted output for secure storage :rtype str

ciphers.cipher_utils module

ciphers.cipher_utils.expand_attrs(generic_interface)[source]
ciphers.cipher_utils.gen_random_secret(secret_length: int)[source]

ciphers.crypto_backend module

class ciphers.crypto_backend.Decryptor(cipher_params: dict, arg_params: dict, **kwargs)[source]

Bases: ciphers.cipher.Decryptor

Decryptor class for symmetric decryption through Fernet module. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

decrypt(cipher_text)[source]

Template method for decryption of a cipher text

Parameters

cipher_text – input message for decryption

:type str :returns: decryption output access/modification :rtype str

class ciphers.crypto_backend.Encryptor(cipher_params: dict, arg_params: dict, **kwargs)[source]

Bases: ciphers.cipher.Encryptor

Encryptor class for symmetric encryption through Fernet module. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

encrypt(plain_text)[source]

Template method for encryption of a single message

Parameters

plain_text – input message for encryption

:type str :returns: encrypted output for secure storage :rtype str

ciphers.crypto_fernet module

class ciphers.crypto_fernet.Decryptor(**kwargs)[source]

Bases: ciphers.cipher.Decryptor

Decryptor class for symmetric decryption through Fernet module. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

decrypt(cipher_text)[source]

Template method for decryption of a cipher text

Parameters

cipher_text – input message for decryption

:type str :returns: decryption output access/modification :rtype str

class ciphers.crypto_fernet.Encryptor(**kwargs)[source]

Bases: ciphers.cipher.Encryptor

Encryptor class for symmetric encryption through Fernet module. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

encrypt(plain_text: str)[source]

Template method for encryption of a single message

Parameters

plain_text – input message for encryption

:type str :returns: encrypted output for secure storage :rtype str

ciphers.crypto_openssl module

class ciphers.crypto_openssl.Decryptor(cipher_params={}, arg_params={}, **kwargs)[source]

Bases: ciphers.cipher.Decryptor

Decryptor class for openssl backend via Fernet. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

decrypt(cipher_text)[source]

Template method for decryption of a cipher text

Parameters

cipher_text – input message for decryption

:type str :returns: decryption output access/modification :rtype str

class ciphers.crypto_openssl.Encryptor(cipher_params={}, arg_params={}, **kwargs)[source]

Bases: ciphers.cipher.Encryptor

Encryptor class for openssl backend via Fernet. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

encrypt(plain_text: str)[source]

Template method for encryption of a single message

Parameters

plain_text – input message for encryption

:type str :returns: encrypted output for secure storage :rtype str

ciphers.gpg module

class ciphers.gpg.Decryptor(cipher_params={}, arg_params={}, **kwargs)[source]

Bases: ciphers.cipher.Decryptor

Decryptor class for symmetric decryption through Fernet module. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

decrypt(cipher_text)[source]

Template method for decryption of a cipher text

Parameters

cipher_text – input message for decryption

:type str :returns: decryption output access/modification :rtype str

import_keys()[source]
class ciphers.gpg.Encryptor(cipher_params={}, arg_params={}, **kwargs)[source]

Bases: ciphers.cipher.Encryptor

Encryptor class for symmetric encryption through Fernet module. Essential parameters such as generated keys and cipher modes are dunder-prefixed for reuse while decrypting the message.

encrypt(plain_text)[source]

Template method for encryption of a single message

Parameters

plain_text – input message for encryption

:type str :returns: encrypted output for secure storage :rtype str

import_keys()[source]

ciphers.libsodium module

Module contents

Test cipher extensions