예제 #1
0
import dead_wombat

crypt_key = dead_wombat.make_aes_key("secretkey")

encrypted_file = open("encrypted_output", "rb")
file_input = encrypted_file.read()
print("encrypted_file is :\n", file_input)
print("size of file is:", len(file_input))

decoded_file = dead_wombat.aes_decrypt_key(crypt_key, file_input)
# print("decoded file is {\n",decoded_file.encode('UTF-32'),"\n}")
file_save = open("test_output.txt", "w")
file_save.write(decoded_file)
file_save.close()
예제 #2
0
import dead_wombat
#this encrypts with the key "secretkey" not the crypto key generated from that
password = "******"
crypt_key = dead_wombat.make_aes_key(password)
file_output = dead_wombat.aes_crypt_key(crypt_key, 'test.txt')
print("password is",password)
print("hashed password(server password) is:",dead_wombat.make_hash(password))
print("salt is wombat")
print("key is", crypt_key)
print("string key is", crypt_key)
#print("encrypted file is ",file_output)
print("size of file is",len(file_output))
print("file is :",file_output)
encrypted_file = open('encrypted_output', 'wb')
encrypted_file.write(file_output)
encrypted_file.close()