encryption#
- class predict_backend.utils.encryption.Cipher(key='placeholder_key', salt='')#
Bases:
object
- decrypt(enc)#
Encrypted bytes are decrypted using the AES cipher and finally decoded (unpadded) using the PKCS7 standard.
- Parameters:
enc – Encrypted raw data.
- Returns decrypted_bytes:
Unencrypted byte array.
- decrypt_stream(enc)#
- encrypt(raw)#
Raw bytes are encoded using PKCS7 standard padding, and encrypted using the aes cypher.
- Parameters:
raw – Raw byte array that is to be encrypted.
- Returns encrypted:
Encrypted bytearray.
- encrypt_stream(raw)#
- predict_backend.utils.encryption.decrypt_string(data)#
- Return type:
str
- predict_backend.utils.encryption.encrypt_string(data)#
- Return type:
str