
Public Member Functions | |
| def | __init__ (self, key, mode, IV=None) |
| def | new (cls, key, mode, IV=None, kwargs) |
| def | encrypt (self, string) |
| def | decrypt (self, string) |
A **PEP 272: Block Encryption Algorithms** compliant **Symmetric Key Cipher**.
| def wolfcrypt.ciphers._Cipher.decrypt | ( | self, | |
| string | |||
| ) |
Decrypts **string**, using the key-dependent data in the object and with the appropriate feedback mode. The string's length must be an exact multiple of the algorithm's block size or, in CFB mode, of the segment size. Returns a string containing the plaintext.
| def wolfcrypt.ciphers._Cipher.encrypt | ( | self, | |
| string | |||
| ) |
Encrypts a non-empty string, using the key-dependent data in the object, and with the appropriate feedback mode. The string's length must be an exact multiple of the algorithm's block size or, in CFB mode, of the segment size. Returns a string containing the ciphertext.
| def wolfcrypt.ciphers._Cipher.new | ( | cls, | |
| key, | |||
| mode, | |||
IV = None, |
|||
| kwargs | |||
| ) |
Returns a ciphering object, using the secret key contained in the string **key**, and using the feedback mode **mode**, which must be one of MODE_* defined in this module. If **mode** is MODE_CBC or MODE_CFB, **IV** must be provided and must be a string of the same length as the block size. Not providing a value of **IV** will result in a ValueError exception being raised.