is_encrypted¶
-
EncryptHelper.
is_encrypted
(data: Union[str, bytes], key: Union[str, bytes] = None) → bool[source]¶ Returns True if the passed
data
appears to be encrypted. Can only verify encryption if the samekey
that was used to encrypt the data is passed.- Parameters
- Raises
EncryptKeyMissing – Either no key was passed, or something is wrong with the key.
- Return bool is_encrypted
True if the data is encrypted, False if it’s not encrypted or wrong key used.