Add global encryptor

This commit is contained in:
Itay Mizeretz 2018-02-13 16:29:24 +02:00
parent 0ed2f74824
commit 29e85100d2
1 changed files with 3 additions and 0 deletions

View File

@ -46,3 +46,6 @@ class Encryptor:
cipher_iv = enc_message[0:AES.block_size]
cipher = AES.new(self._cipher_key, AES.MODE_CBC, cipher_iv)
return self._unpad(cipher.decrypt(enc_message[AES.block_size:]))
encryptor = Encryptor()