Skip to content

Commit 2b49bc3

Browse files
committed
Some textual changes
1 parent b11023a commit 2b49bc3

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

encryption.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def __init__(self, cls):
4343
settings = {
4444
'CIPHER': {
4545
'value': 'AES',
46-
'description': 'The specific cipher, use \'ciphers\' for a complete list',
46+
'description': 'Use \'ciphers\' for a complete list',
4747
'required': True
4848
},
4949
'KEY': {
5050
'value': None,
51-
'description': 'The key to use for encryption/decryption (Auto-Gen)',
51+
'description': 'A secret key',
5252
'required': False
5353
},
5454
'TEXT': {
@@ -58,17 +58,17 @@ def __init__(self, cls):
5858
},
5959
'NONCE': {
6060
'value': None,
61-
'description': 'The nonce to use for encryption/decryption (Auto-Gen)',
61+
'description': 'Number used in communication',
6262
'required': False
6363
},
6464
'MAC': {
6565
'value': None,
66-
'description': 'The mac to use for encryption/decryption (Auto-Gen)',
66+
'description': 'Message Authentication Code',
6767
'required': False
6868
},
6969
'IV': {
7070
'value': None,
71-
'description': 'The initialization vector used for encryption/decryption (Auto-Gen)',
71+
'description': 'Initialization Vector',
7272
'required': False
7373
}
7474
}

hashing.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
class Prompt(Cmd):
1414
def __init__(self, cls):
1515
super(Prompt, self).__init__()
16-
self.prompt = '{blue}program {cyan}(hashing) ➥ {reset}'.format(blue=cls['BLUE'], cyan=cls['CYAN'],
17-
reset=cls['RESET'])
16+
self.prompt = '{blue}program {cyan}(hashing) ➥ {reset}'.format(blue=cls['BLUE'], cyan=cls['CYAN'], reset=cls['RESET'])
1817
self.cls = cls
1918

2019
# We define the settings here
2120
settings = {
2221
'ALGO': {
2322
'value': 'SHA-256',
24-
'description': 'The specific algorithm, use \'hashes\' for a complete list',
23+
'description': 'Use \'algos\' for a complete list',
2524
'required': True
2625
},
2726
'TEXT': {
@@ -31,12 +30,12 @@ def __init__(self, cls):
3130
},
3231
'HASH': {
3332
'value': None,
34-
'description': 'The hash to compare to (Only for comparing)',
33+
'description': 'Hash to compare to (Only for comparing)',
3534
'required': False
3635
},
3736
'SALT': {
3837
'value': None,
39-
'description': 'The salt used for hashing (Auto-Gen)',
38+
'description': 'Additional safeguard value',
4039
'required': False
4140
}
4241
}
@@ -49,7 +48,7 @@ def do_help(self, _ln):
4948
['unset', 'Unset a certain setting'],
5049
['hash', 'Hash some text (configure first)'],
5150
['compare', 'Compare a hash (setting: TEXT) with a generated hash (setting: HASH)'],
52-
['hashes', 'Obtain a list with supported hashes'],
51+
['algos', 'Obtain a list with supported hashing algorithms'],
5352
]
5453
print(tabulate(cmd_list, stralign="center", tablefmt="fancy_grid",
5554
headers=[self.cls['BLUE'] + "Command" + self.cls['RESET'],
@@ -149,14 +148,14 @@ def do_compare(self, _ln):
149148
else:
150149
print(self.cls['RED'] + '--=({algo})=--\nHashed & Compared: DIFFERENT HASH'.format(algo=algo))
151150

152-
def do_hashes(self, _ln):
153-
print(self.cls['BLUE'] + '-----[HASHES]-----', self.cls['RESET'] +
151+
def do_algos(self, _ln):
152+
print(self.cls['BLUE'] + '-----[ALGORITHMS]-----', self.cls['RESET'] +
154153
'Be aware that some of the algorithms like MD5 and SHA-1 are not '
155154
'secure anymore and should never be used to hash valuable data. '
156-
'An algorithm such as BCrypt defaultly only supports strings of max '
157-
'72 bytes long, therefore we must encrypt the text with another hash (SHA256 in this example) '
155+
'An algorithm such as bcrypt defaultly only supports strings of max '
156+
'72 bytes long, therefore we must encrypt the text with another hash (SHA256 in this instance) '
158157
'to implement support for longer strings.', self.cls['CYAN'] +
159-
'Hashes: ' + self.cls['RESET'] + 'SHA-256, SHA-512, BLAKE2b, bcrypt, scrypt, MD5, SHA-1', sep='\n', end='\n\n')
158+
'Algorithms: ' + self.cls['RESET'] + 'SHA-256, SHA-512, BLAKE2b, bcrypt, scrypt, MD5, SHA-1', sep='\n', end='\n\n')
160159

161160
def default(self, ln):
162161
ln = ln.lower()

0 commit comments

Comments
 (0)