encrypt.py (284B)
1#!/usr/bin/env python3 2 3from Crypto.Cipher import AES 4import os, sys 5 6img_in = open(sys.argv[1], "rb").read() 7img_in += b'\00' * (16 - (len(img_in) % 16)) 8cipher = AES.new(os.urandom(16), AES.MODE_ECB) 9img_out = cipher.encrypt(img_in) 10open(sys.argv[1] + ".enc", "wb+").write(img_out)