From f31135dd8e4e006780d9a4c24b81da811e48887b Mon Sep 17 00:00:00 2001 From: Daniel Krol Date: Tue, 14 Jun 2022 10:59:15 -0400 Subject: [PATCH] Fix derived keys --- test_client/test_client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test_client/test_client.py b/test_client/test_client.py index dba6a0b..4e64c4b 100755 --- a/test_client/test_client.py +++ b/test_client/test_client.py @@ -148,15 +148,16 @@ class WalletSync(): # TODO - do this correctly. This is a hack example. def derive_login_password(root_password): - return hashlib.sha256('login:' + root_password.encode('utf-8')).hexdigest() + return hashlib.sha256(('login:' + root_password).encode('utf-8')).hexdigest() # TODO - do this correctly. This is a hack example. def derive_sdk_password(root_password): - return hashlib.sha256('sdk:' + root_password.encode('utf-8')).hexdigest() + return hashlib.sha256(('sdk:' + root_password).encode('utf-8')).hexdigest() # TODO - do this correctly. This is a hack example. +# TODO - wallet_id in this? or in all of the derivations? def derive_hmac_key(root_password): - return hashlib.sha256('hmac:' + root_password.encode('utf-8')).hexdigest() + return hashlib.sha256(('hmac:' + root_password).encode('utf-8')).hexdigest() # TODO - do this correctly. This is a hack example. def create_hmac(wallet_state, hmac_key):