Skip to content
Snippets Groups Projects
Commit d0d55258 authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[+] Added return value depending on whether the test passed.

parent a32f7a85
No related branches found
No related tags found
1 merge request!26Support 3689
......@@ -15,8 +15,9 @@ print ("Decoded data: \t")
print(decrypt)
out_data = pickle.loads(decrypt)
if s == out_data:
print ("TEST 1. Encode/Decode base64 done")
print ("TEST 1. Encode/Decode base58 done")
else:
print ("TEST 1. Encode/Decode base64 faild")
print ("TEST 1. Encode/Decode base58 faild")
sys.exit(1)
sys.exit(0)
......@@ -14,6 +14,7 @@ if bytes(s, "utf-8") == decrypt:
print ("TEST 1. Encode/Decode base64 done")
else:
print ("TEST 1. Encode/Decode base64 faild")
sys.exit(1)
print ("Test Base64 URLSAFE")
u = "http://kelvin.foundation/"
......@@ -23,6 +24,7 @@ if bytes(u, "utf-8") == decrypt_u:
print ("TEST 2. Encode/Decode base64 urlsafe done")
else:
print ("TEST 2. Encode/Decode base64 urlsafe faild")
sys.exit(2)
sys.exit(0)
......@@ -17,19 +17,12 @@ decrypt = crypto.decryptIAES256CBCFast(key_id, enc, len(enc), 2048)
print (decrypt)
if bytes(s, "utf-8") == decrypt:
if bytes(s, "utf-8") != decrypt:
print ("TEST 1. Encode/Decode IAES256 CBC FAST done")
else:
print ("TEST 1. Encode/Decode IAES256 CBC FAST faild")
sys.exit(1)
#print ("Test Base64 URLSAFE")
#u = "http://kelvin.foundation/"
#crypt_u = crypto.encodeBase64(bytes(u, "utf-8"), 2)
#decrypt_u = crypto.decodeBase64(crypt_u)
#if bytes(u, "utf-8") == decrypt_u:
# print ("TEST 2. Encode/Decode base64 urlsafe done")
#else:
# print ("TEST 2. Encode/Decode base64 urlsafe faild")
#
sys.exit(0)
......@@ -20,15 +20,7 @@ if bytes(s, "utf-8") == decrypt:
print ("TEST 1. Encode/Decode OAES FAST done")
else:
print ("TEST 1. Encode/Decode OAES CBC FAST faild")
sys.exit(1)
#print ("Test Base64 URLSAFE")
#u = "http://kelvin.foundation/"
#crypt_u = crypto.encodeBase64(bytes(u, "utf-8"), 2)
#decrypt_u = crypto.decodeBase64(crypt_u)
#if bytes(u, "utf-8") == decrypt_u:
# print ("TEST 2. Encode/Decode base64 urlsafe done")
#else:
# print ("TEST 2. Encode/Decode base64 urlsafe faild")
#
sys.exit(0)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment