Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from crypto.cipher import aes as aes
- key = b'youareontherightway'[:16]
- c = AES.new(key, AES.MODE_EAX)
- ct, tag = c.encrypt_and_digest(open("task.png", 'rb').read())
- f_o = open("out.bin", 'wb')
- [f_o.write(i) for i in (c.nonce, tag, ct)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement