tdigitalbitbox: fix stretch_key bytes/str confusion - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9a3f2e8fcca74595289b99a1f3b1b569ad568503 DIR parent 31a5d0c2f07ab3d60bfea26919b17a21adaf3ef7 HTML Author: Janus <ysangkok@gmail.com> Date: Fri, 7 Dec 2018 18:41:40 +0100 digitalbitbox: fix stretch_key bytes/str confusion Diffstat: M electrum/plugins/digitalbitbox/dig… | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/plugins/digitalbitbox/digitalbitbox.py b/electrum/plugins/digitalbitbox/digitalbitbox.py t@@ -129,8 +129,8 @@ class DigitalBitbox_Client(): return False - def stretch_key(self, key): - return to_hexstr(hashlib.pbkdf2_hmac('sha512', key.encode('utf-8'), b'Digital Bitbox', iterations = 20480)) + def stretch_key(self, key: bytes): + return to_hexstr(hashlib.pbkdf2_hmac('sha512', key, b'Digital Bitbox', iterations = 20480)) def backup_password_dialog(self):