2019-01-20 21:59:03 +00:00
|
|
|
import hashlib
|
|
|
|
|
|
|
|
hasher = hashlib.md5()
|
2019-01-30 00:39:35 +00:00
|
|
|
with open('simple_policy.py', 'rb') as afile:
|
2019-01-26 20:05:07 +00:00
|
|
|
buf = afile.read()
|
|
|
|
hasher.update(buf)
|
2019-01-20 21:59:03 +00:00
|
|
|
print("md5 of simple: " + hasher.hexdigest())
|
|
|
|
|
|
|
|
hasher = hashlib.md5()
|
2019-01-30 00:39:35 +00:00
|
|
|
with open('moderate_policy.py', 'rb') as afile:
|
2019-01-26 20:05:07 +00:00
|
|
|
buf = afile.read()
|
|
|
|
hasher.update(buf)
|
2019-01-20 21:59:03 +00:00
|
|
|
print("md5 of moderate: " + hasher.hexdigest())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hasher = hashlib.sha1()
|
2019-01-30 00:39:35 +00:00
|
|
|
with open('simple_policy.py', 'rb') as afile:
|
2019-01-26 20:05:07 +00:00
|
|
|
buf = afile.read()
|
|
|
|
hasher.update(buf)
|
2019-01-20 21:59:03 +00:00
|
|
|
print("sha1 of simple: " + hasher.hexdigest())
|
|
|
|
|
|
|
|
hasher = hashlib.sha1()
|
2019-01-30 00:39:35 +00:00
|
|
|
with open('moderate_policy.py', 'rb') as afile:
|
2019-01-26 20:05:07 +00:00
|
|
|
buf = afile.read()
|
|
|
|
hasher.update(buf)
|
2019-01-20 21:59:03 +00:00
|
|
|
print("sha1 of moderate: " + hasher.hexdigest())
|