Encrypt.des_encrypt¶
-
securefile.Encrypt.des_encrypt()¶ Encrypt a plain text with DES algorithm.
Example:
from securefile import Encrypt from securefile.keyset import DES_KEY des_key = DES_KEY.genrate('12345678123456781234567812345678') enc = Encrypt('test.md') enc.open() enc.des_encrypt(des_key, commit=True) enc.close()
Parameters: Returns: Encrypted Message or Cipher Text.
Raises: - ValueError – Key Should be 8 bytes long
- ValueError – Data size should be multiple of 8
Warning
- Emoji not supported in DES encryption it will skip if emoji encounter
- To overcome this please use base64 encoding