0610 - AES256CBC, my first wheel for Python

AES256CBC

Wrapper for AES 256 CBC using Python.

Get from GitHub

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.

博客原文:0610 - AES256CBC, my first wheel for Python

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容