From a5b6805b5f39609febf0c0f8ac0d5aa297f210ab Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 10 Sep 2020 20:50:41 +0000 Subject: [PATCH] Update readme to have version tag --- README.md | 2 +- src/onionrcrypto/hashers.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3049c33b..d50b58f0 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Master may be unstable, you should use the latest release tag. (checkout via git `$ sudo apt install python3-pip python3-dev tor` * Have python3.7+, python3-pip, Tor (daemon, not browser) installed. python3-dev is recommended. -* Clone the git repo: `$ git clone https://gitlab.com/beardog/onionr` +* Clone the git repo: `$ git clone https://gitlab.com/beardog/onionr --tags` * cd into install direction: `$ cd onionr/` * Install the Python dependencies ([virtualenv strongly recommended](https://virtualenv.pypa.io/en/stable/userguide/)): `$ pip3 install --require-hashes -r requirements.txt` * (Optional): Install desktop notification dependencies: `$ pip3 install --require-hashes -r requirements-notifications.txt` diff --git a/src/onionrcrypto/hashers.py b/src/onionrcrypto/hashers.py index 007d923d..830aa998 100644 --- a/src/onionrcrypto/hashers.py +++ b/src/onionrcrypto/hashers.py @@ -1,4 +1,8 @@ -import hashlib, nacl.hash +import hashlib + +import nacl.hash + + def sha3_hash(data): try: data = data.encode() @@ -8,9 +12,10 @@ def sha3_hash(data): hasher.update(data) return hasher.hexdigest() + def blake2b_hash(data): try: data = data.encode() except AttributeError: pass - return nacl.hash.blake2b(data) \ No newline at end of file + return nacl.hash.blake2b(data)