diff options
Diffstat (limited to 'meta/encrypt.py')
| -rw-r--r-- | meta/encrypt.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/encrypt.py b/meta/encrypt.py new file mode 100644 index 0000000..5451f4a --- /dev/null +++ b/meta/encrypt.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +from Crypto.Cipher import AES +import os, sys + +img_in = open(sys.argv[1], "rb").read() +img_in += b'\00' * (16 - (len(img_in) % 16)) +cipher = AES.new(os.urandom(16), AES.MODE_ECB) +img_out = cipher.encrypt(img_in) +open(sys.argv[1] + ".enc", "wb+").write(img_out) |
