-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encryption and decryption functionality implemented
- Loading branch information
1 parent
71ac783
commit 922df53
Showing
9 changed files
with
131 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ Lib | |
Scripts | ||
randtrix_db.sqlite | ||
.idea | ||
venv | ||
venv | ||
test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
""" | ||
################################################################ | ||
# THE RANDTRIX VAULT # | ||
# RANDOM MECHANISM WITH AES-256 ENCRYPTION FOR PASSWORD PROTECT # | ||
# # | ||
# DEVELOPER NAME: BALAVIGNESH M # | ||
# LICENSE: MIT # | ||
# VERSION: 0.1.0 # | ||
################################################################# | ||
""" | ||
|
||
ENCODE_RANGE = 16 | ||
KEY_SIZE = 32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
|
||
""" | ||
################################################################ | ||
# THE RANDTRIX VAULT # | ||
# RANDOM MECHANISM WITH AES-256 ENCRYPTION FOR PASSWORD PROTECT # | ||
# # | ||
# DEVELOPER NAME: BALAVIGNESH M # | ||
# LICENSE: MIT # | ||
# VERSION: 0.1.0 # | ||
################################################################# | ||
""" | ||
|
||
class AESEncryptionException(Exception):pass | ||
class RandtrixException(Exception):pass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
# from randtrix_mechanic import * | ||
# from randtrix_db import * | ||
# from mechanic import * | ||
# from db import * | ||
|
||
# hash_l = RandtrixPasswordMechanic(456790,"test123","test234","test567").pass_2_hash() | ||
# hash_l = RandtrixPasswordMechanic(456790,"test123","test234","test567").randomize() | ||
# hash_l = RandtrixPasswordMechanic(456790,"test123","test234","test567").hash_2_salt() | ||
# hash_l_k = RandtrixPasswordMechanic(456709, "test123", "test234", "test567").encrypt_pass("Hello World") | ||
# hash_l = AES16256Codec(456790,"test123","test234","test567").pass_2_hash() | ||
# hash_l = AES16256Codec(456790,"test123","test234","test567").randomize() | ||
# hash_l = AES16256Codec(456790,"test123","test234","test567").hash_2_salt() | ||
# hash_l_k = AES16256Codec(456709, "test123", "test234", "test567").encrypt_pass("Hello World") | ||
# print(hash_l_k) | ||
# | ||
# hash_l = RandtrixPasswordMechanic(638590, "test123", "test234", "test567").decrypt_pass(hash_l_k) | ||
# hash_l = AES16256Codec(638590, "test123", "test234", "test567").decrypt_pass(hash_l_k) | ||
# print(hash_l) | ||
# | ||
# hash_l = RandtrixPasswordMechanic(189463, "test123", "test234", "test567").decrypt_pass(hash_l_k) | ||
# hash_l = AES16256Codec(189463, "test123", "test234", "test567").decrypt_pass(hash_l_k) | ||
# print(hash_l) | ||
|
||
|
||
# s = RandrixDBManager.create_rtrix("bala", "123", "test") | ||
# print(s) | ||
|
||
from randtrix_vault.cryptix import * | ||
|
||
s = AES16256Codec('mercidus?wqertyum', 'bbdefa2950f49882f295b1285d4fa9dec45fc4144bfb07ee6acc68762d12c2e3').encrypt() | ||
print(s) | ||
# print(''.join([chr(i) for i in s])) | ||
message = 'mercidus?wqertkumddddddddddddddddddddddd' | ||
key = 'bbdefa2950f49882f295b1285d4fa9dec45fc4144bfb07ee6acc68762d12c2e' | ||
s = AES16256Codec(message, key).encrypt() | ||
decryped_message = AES16256Codec(s, key , encode=False).decrypt() | ||
assert message == decryped_message |