mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 12:22:52 +03:00
Python 3 fixes.
This commit is contained in:
parent
5266237201
commit
ecff4646a5
@ -123,7 +123,7 @@ YK_EWOULDBLOCK = 0x0b
|
||||
if not yk_init():
|
||||
raise Exception("Unable to initialize ykpers")
|
||||
|
||||
ykpers_version = ykpers_check_version(None)
|
||||
ykpers_version = ykpers_check_version(None).decode('ascii')
|
||||
|
||||
|
||||
def yk_get_errno():
|
||||
@ -179,7 +179,7 @@ class LegacyOathOtp(object):
|
||||
if len(key) > 20:
|
||||
raise ValueError('YubiKey slots cannot handle keys over 20 bytes')
|
||||
slot = SLOT_CONFIG if slot == 1 else SLOT_CONFIG2
|
||||
key += chr(0) * (20 - len(key)) # Keys must be padded to 20 bytes.
|
||||
key += b'\x00' * (20 - len(key)) # Keys must be padded to 20 bytes.
|
||||
|
||||
st = ykds_alloc()
|
||||
yk_get_status(self._device, st)
|
||||
|
Loading…
Reference in New Issue
Block a user