|
|
|
|
42
|
|
42
|
|
43
|
# select hash function
|
43
|
# select hash function
|
44
|
f = hashlib.new(function.lower())
|
44
|
f = hashlib.new(function.lower())
|
45
|
- #f = hash_function[function.lower()]
|
|
|
46
|
|
45
|
|
47
|
# make digest from the given string
|
46
|
# make digest from the given string
|
48
|
f.update(string.strip())
|
47
|
f.update(string.strip())
|
|
|
|
|
51
|
# print result
|
50
|
# print result
|
52
|
search.result_container.answers.clear()
|
51
|
search.result_container.answers.clear()
|
53
|
search.result_container.answers.add(function + " " + gettext('hash function') + ": " + digest)
|
52
|
search.result_container.answers.add(function + " " + gettext('hash function') + ": " + digest)
|
54
|
- return True
|
|
|
|
|
53
|
+ return True
|