diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2020-06-15 19:15:17 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2020-06-15 19:15:17 +0200 |
commit | 3dd267e062a2f3e182d84f15e13b15b6dd4958e0 (patch) | |
tree | 8994b48f6aa359bc52694f1b732c7f1b5ffc4184 /unittest/constants.py | |
parent | dd0cdcd2130699be8dde5dbadcf18cd9c00ef78f (diff) | |
parent | 89a73d88c9026b6347bea113896d24e419c4370c (diff) | |
download | libnitrokey-3dd267e062a2f3e182d84f15e13b15b6dd4958e0.tar.gz libnitrokey-3dd267e062a2f3e182d84f15e13b15b6dd4958e0.tar.bz2 |
Merge branch 'master' into get_status
Update to latest codebase
Diffstat (limited to 'unittest/constants.py')
-rw-r--r-- | unittest/constants.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unittest/constants.py b/unittest/constants.py index 645ef6a..4047f59 100644 --- a/unittest/constants.py +++ b/unittest/constants.py @@ -18,12 +18,7 @@ along with libnitrokey. If not, see <http://www.gnu.org/licenses/>. SPDX-License-Identifier: LGPL-3.0 """ - -from misc import to_hex - -def bb(x): - return bytes(x, encoding='ascii') - +from misc import to_hex, bb RFC_SECRET_HR = '12345678901234567890' RFC_SECRET = to_hex(RFC_SECRET_HR) # '31323334353637383930...' @@ -39,6 +34,9 @@ class DefaultPasswords: USER_TEMP = b'234234234' UPDATE = b'12345678' UPDATE_TEMP = b'123update123' + UPDATE_LONG = b'1234567890'*2 + UPDATE_TOO_LONG = UPDATE_LONG + b'x' + UPDATE_TOO_SHORT = UPDATE_LONG[:7] class DeviceErrorCode: @@ -49,6 +47,7 @@ class DeviceErrorCode: STATUS_NOT_AUTHORIZED = 5 STATUS_AES_DEC_FAILED = 0xa STATUS_UNKNOWN_ERROR = 100 + STATUS_DISCONNECTED = 255 class LibraryErrors: @@ -59,4 +58,5 @@ class LibraryErrors: HOTP_slot_count = 3 -TOTP_slot_count = 15
\ No newline at end of file +TOTP_slot_count = 15 +PWS_SLOT_COUNT = 16 |