728x90 반응형 pycrypto1 AES256/ base64 암호화 with python 1. install pycrytpodome pip install pycryptodome 2. python class import base64 from Crypto import Random from Crypto.Cipher import AES class AES256(): def __init__(self, key): self.bs = 128 self.key = key.encode('utf-8') self.key = AES256.str_to_bytes(key) @staticmethod def str_to_bytes(data): u_type = type(b''.decode('utf8')) if isinstance(data, u_type): return data.encode('utf8') return data d.. 2020. 3. 30. 이전 1 다음 728x90