tlslite.utils.cipherfactory module
Factory functions for symmetric cryptography.
- tlslite.utils.cipherfactory.createAESCCM(key, implList=None)[source]
Create a new AESCCM object.
- Parameters:
key (bytearray) – A 16 or 32 byte byte array to serve as key.
- Return type:
tlslite.utils.AESCCM
- Returns:
An AESCCM object.
- tlslite.utils.cipherfactory.createAESCCM_8(key, implList=None)[source]
Create a new AESCCM object with truncated tag.
- Parameters:
key (bytearray) – A 16 or 32 byte byte array to serve as key.
- Return type:
tlslite.utils.AESCCM
- Returns:
An AESCCM object.
- tlslite.utils.cipherfactory.createAESCTR(key, IV, implList=None)[source]
Create a new AESCTR object.
- tlslite.utils.cipherfactory.createAESGCM(key, implList=None)[source]
Create a new AESGCM object.
- Parameters:
key (bytearray) – A 16 or 32 byte byte array.
- Return type:
tlslite.utils.AESGCM
- Returns:
An AESGCM object.
- tlslite.utils.cipherfactory.createCHACHA20(key, implList=None)[source]
Create a new CHACHA20_POLY1305 object.
- Parameters:
key (bytearray) – a 32 byte array to serve as key
- Return type:
tlslite.utils.CHACHA20_POLY1305
- Returns:
A ChaCha20/Poly1305 object
- tlslite.utils.cipherfactory.createTripleDES(key, IV, implList=None)[source]
Create a new 3DES object.
- tlslite.utils.cipherfactory.tripleDESPresent = True
Inform if the 3DES algorithm is supported.