Skip to content

atjason/AES256CBC_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c1ee5ee · Jun 10, 2017

History

3 Commits
Jun 10, 2017
Jun 10, 2017

Repository files navigation

AES256CBC for python

Wrapper for AES 256 CBC using Python.

Dependency

Depends on cryptography

$ pip install cryptography

Note: also refers to Swift version: AES256CBC

Usage

txt = "Hello World."
password = AES256CBC.generate_password()

encrypted = AES256CBC.encrypt(txt, password)
decrypted = AES256CBC.decrypt(encrypted, password)

assert decrypted == txt

Note:

  • The password must be exactly 32 chars long for AES-256.
  • IV of AES is the first 16 chars of encrypted strings.
  • The encrypted strings are base 64 encoded.

About

Wrapper for AES 256 CBC using Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages