aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/util/rpcauth-test.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/util/rpcauth-test.py b/test/util/rpcauth-test.py
index dfbb5ea3a7..2456feb102 100755
--- a/test/util/rpcauth-test.py
+++ b/test/util/rpcauth-test.py
@@ -28,16 +28,15 @@ class TestRPCAuth(unittest.TestCase):
self.assertGreaterEqual(len(self.rpcauth.generate_salt()), 16)
def test_generate_password(self):
- salt = self.rpcauth.generate_salt()
- password, password_hmac = self.rpcauth.generate_password(salt)
-
+ password = self.rpcauth.generate_password()
expected_password = base64.urlsafe_b64encode(
base64.urlsafe_b64decode(password)).decode('utf-8')
self.assertEqual(expected_password, password)
def test_check_password_hmac(self):
salt = self.rpcauth.generate_salt()
- password, password_hmac = self.rpcauth.generate_password(salt)
+ password = self.rpcauth.generate_password()
+ password_hmac = self.rpcauth.password_to_hmac(salt, password)
m = hmac.new(bytearray(salt, 'utf-8'),
bytearray(password, 'utf-8'), 'SHA256')