Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. from crypto.cipher import aes as aes
  2.  
  3.  
  4. key = b'youareontherightway'[:16]
  5.  
  6.  
  7. c = AES.new(key, AES.MODE_EAX)
  8. ct, tag = c.encrypt_and_digest(open("task.png", 'rb').read())
  9. f_o = open("out.bin", 'wb')
  10.  
  11. [f_o.write(i) for i in (c.nonce, tag, ct)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement