Encrypt.des_decrypt

securefile.Encrypt.des_decrypt(self, key, commit=False)

Decrypt a cipher text into plain text using 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_decrypt(des_key, commit=True)
enc.close()
Parameters:
  • key (DES_KEY) – Encryption key.
  • commit=False (bool) – Save the change or not.
Returns:

Decrypted Message or Plain Text.

Raises:

ValueError – Text is not valid DES string. Decode failed.