apicrud.aes_encrypt¶
aes_encrypt.py
Provides easier-to-use AES CBC encrypt/decrypt operations for strings
created 14-may-2019 by richb@instantlinux.net
Classes
|
AES encryption for strings |
-
class
apicrud.aes_encrypt.
AESEncrypt
(secret)¶ AES encryption for strings
-
secret
¶ passphrase (suggest at least 16 characters)
- Type
str
-
decrypt
(enc)¶ decrypt an object
- Parameters
enc (bytes) – encrypted object
- Returns
decrypted string
- Return type
str
-
encrypt
(raw)¶ encrypt a string
- Parameters
raw (str) – object to be encrypted
- Returns
encrypted object
- Return type
bytes
-