This is an automated email from the ASF dual-hosted git repository.

gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git

commit 1cddc581d837616f7728d67a6b872cb1759c3030
Author: Greg Stein <[email protected]>
AuthorDate: Mon May 30 19:22:07 2022 -0500

    token inputs are human strings
---
 v3/steve/crypto.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/v3/steve/crypto.py b/v3/steve/crypto.py
index 7a07e69..6974937 100644
--- a/v3/steve/crypto.py
+++ b/v3/steve/crypto.py
@@ -40,9 +40,9 @@ def gen_opened_key(edata: bytes, salt: bytes) -> bytes:
     return _hash(edata, salt)
 
 
-def gen_token(opened_key: bytes, value: bytes, salt: bytes) -> bytes:
+def gen_token(opened_key: bytes, value: str, salt: bytes) -> bytes:
     "Generate a voter or issue token."
-    return _hash(opened_key + value, salt)
+    return _hash(opened_key + value.encode(), salt)
 
 
 ### fix return type, to be a tuple

Reply via email to