Skip to content

Instantly share code, notes, and snippets.

View frizz925's full-sized avatar

Izra frizz925

  • Tokyo, Japan
View GitHub Profile
@frizz925
frizz925 / main.py
Last active May 28, 2024 02:47
AES-256-CBC w/ Base64 using PyCryptodome library
from Crypto.Cipher import AES
from Crypto.Util import Padding
from hashlib import md5
from base64 import b64encode, b64decode
import sys
passphrase = sys.argv[1]
content = sys.argv[2]
print(passphrase, content)
import numpy as np
np.random.seed(1)
inputs = np.array([
[0, 0, 1],
[0, 1, 1],
[1, 0, 1],
[1, 1, 1]
])