diff options
Diffstat (limited to 'scripts/encryptor.py')
-rw-r--r-- | scripts/encryptor.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/encryptor.py b/scripts/encryptor.py index 2dac487..ed0c1d8 100644 --- a/scripts/encryptor.py +++ b/scripts/encryptor.py | |||
@@ -12,6 +12,9 @@ def hex2bin(hexStr): | |||
12 | return binascii.unhexlify(hexStr) | 12 | return binascii.unhexlify(hexStr) |
13 | 13 | ||
14 | iv = hex2bin("6e657665726d696e647468656e66756b") | 14 | iv = hex2bin("6e657665726d696e647468656e66756b") |
15 | |||
16 | iv_ready = base64.b64encode(iv) | ||
17 | |||
15 | key = hex2bin("6e6565726d666e646e6565726d666e64") | 18 | key = hex2bin("6e6565726d666e646e6565726d666e64") |
16 | 19 | ||
17 | mode = CBC(iv) | 20 | mode = CBC(iv) |
@@ -67,3 +70,8 @@ asy_cipher = PKCS1_OAEP.new(publickey, hashAlgo=Crypto.Hash.SHA256) | |||
67 | ciphertext = asy_cipher.encrypt(key) | 70 | ciphertext = asy_cipher.encrypt(key) |
68 | 71 | ||
69 | key = base64.b64encode(ciphertext) | 72 | key = base64.b64encode(ciphertext) |
73 | |||
74 | print(f'key: {key}') | ||
75 | print(f'c: {c}') | ||
76 | print(f'iv: {iv_ready}') | ||
77 | |||