Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (28 loc) · 718 Bytes

README.rst

File metadata and controls

43 lines (28 loc) · 718 Bytes

Simple-AES-Cipher

Pycrypto based Simple And Easy AES Cipher

Dependencies

  • Python 2.7 or later
  • Pycrypto 2.6.1 or later

Install

$ pip install Simple-AES-Cipher

Usage

from simple_aes_cipher import AESCipher, generate_secret_key

pass_phrase = "hogefuga"
secret_key = generate_secret_key(pass_phrase)

# generate cipher
cipher = AESCipher(secret_key)

raw_text = "abcdefg"
encrypt_text = cipher.encrypt(raw_text)
assert raw_text != encrypt_text

decrypt_text = cipher.decrypt(encrypt_text)
assert encrypt_text != decrypt_text
assert decrypt_text == raw_text

LICENSE

  • MIT