AES256 with python

pip install -e git+https://github.com/ostinelli/PyAES256#egg=pyaes

How to use

import aes256
key = "aserghjerg4w5ygb8JHBr8ySuhrergiE"
encrypted = aes256.encrypt("My testing clear text", key)
decrypted = aes256.decrypt(encrypted, key)
print decrypted
# Out: My testing clear text

so

When you want to treat it as a character string

import base64
encrypted_str = base64.b64encode(encrypted)
# Out: d/YSHFGxeeJhNdMeU0ukrKAP90bC0S+UpEWz1V/xOk4=
decrypted = aes256.decrypt(base64.b64decode(encrypted_str), key)
# Out: My testing clear text

iv (initial vector) probably uses the same value all the time

Recommended Posts

AES256 with python
FizzBuzz with Python3
Scraping with Python
Statistics with python
Scraping with Python
Python with Go
Twilio with Python
Play with 2016-Python
Tested with Python
python starts with ()
with syntax (Python)
Bingo with python
Zundokokiyoshi with python
Excel with Python
Microcomputer with Python
Cast with python
Serial communication with Python
Zip, unzip with python
Django 1.11 started with Python3.6
Primality test with Python
Python with eclipse + PyDev.
Socket communication with Python
Data analysis with python 2
Scraping with Python (preparation)
Try scraping with Python.
Learning Python with ChemTHEATER 03
Sequential search with Python
"Object-oriented" learning with python
Run Python with VBA
Handling yaml with python
Solve AtCoder 167 with python
Serial communication with python
[Python] Use JSON with Python
Learning Python with ChemTHEATER 05-1
Learn Python with ChemTHEATER
1.1 Getting Started with Python
Binarization with OpenCV / Python
3. 3. AI programming with Python
Kernel Method with Python
Non-blocking with Python + uWSGI
Scraping with Python + PhantomJS
Posting tweets with python
Drive WebDriver with python
Use mecab with Python3
Voice analysis with python
Think yaml with python
Operate Kinesis with Python
Getting Started with Python
Use DynamoDB with Python
Zundko getter with python
Handle Excel with python
Ohm's Law with Python
Primality test with python
Run Blender with python
Solve Sudoku with Python
Python starting with Windows 7
Heatmap with Python + matplotlib
Multi-process asynchronously with python
Python programming with Atom
Learning Python with ChemTHEATER 02
Use Python 3.8 with Anaconda