From 609eab2ca0af70632ffc98cbc0cc5b23375eebcd Mon Sep 17 00:00:00 2001 From: Joe Arriaga Date: Sun, 20 Jan 2019 13:59:03 -0800 Subject: [PATCH] Created example policy config files. Added my name to the README. --- README.md | 2 +- back/reimbursinator/policies/hasher.py | 27 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 back/reimbursinator/policies/hasher.py diff --git a/README.md b/README.md index 6f818fb..6a07259 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ Open source expense management solution -Daniel Dupriest, Logan Miller, Jack, Joe, Preston, Rupika, Liang Shuaiyi +Daniel Dupriest, Logan Miller, Jack, Joe Arriaga, Preston, Rupika, Liang Shuaiyi diff --git a/back/reimbursinator/policies/hasher.py b/back/reimbursinator/policies/hasher.py new file mode 100644 index 0000000..4500b23 --- /dev/null +++ b/back/reimbursinator/policies/hasher.py @@ -0,0 +1,27 @@ +import hashlib + +hasher = hashlib.md5() +with open ('simple_policy.py', 'rb') as afile: + buf = afile.read() + hasher.update(buf) +print("md5 of simple: " + hasher.hexdigest()) + +hasher = hashlib.md5() +with open ('moderate_policy.py', 'rb') as afile: + buf = afile.read() + hasher.update(buf) +print("md5 of moderate: " + hasher.hexdigest()) + + + +hasher = hashlib.sha1() +with open ('simple_policy.py', 'rb') as afile: + buf = afile.read() + hasher.update(buf) +print("sha1 of simple: " + hasher.hexdigest()) + +hasher = hashlib.sha1() +with open ('moderate_policy.py', 'rb') as afile: + buf = afile.read() + hasher.update(buf) +print("sha1 of moderate: " + hasher.hexdigest())