From 6078fec593afcef1f2bb920b931daada09480f51 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 25 Apr 2021 22:59:52 +0300 Subject: Fix tests --- scripts/encryptor.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/encryptor.py') 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): return binascii.unhexlify(hexStr) iv = hex2bin("6e657665726d696e647468656e66756b") + +iv_ready = base64.b64encode(iv) + key = hex2bin("6e6565726d666e646e6565726d666e64") mode = CBC(iv) @@ -67,3 +70,8 @@ asy_cipher = PKCS1_OAEP.new(publickey, hashAlgo=Crypto.Hash.SHA256) ciphertext = asy_cipher.encrypt(key) key = base64.b64encode(ciphertext) + +print(f'key: {key}') +print(f'c: {c}') +print(f'iv: {iv_ready}') + -- cgit v1.2.3-70-g09d2