diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-07-20 08:35:02 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-01 13:54:56 +0200 |
commit | f3ccdeb50255e940df0caa9b9cc5b232b5e2fbf8 (patch) | |
tree | 7595886e5148aa91274fcb70b6cf1f688b4f7214 | |
parent | fb37116ea77f7961b12b1e289c3d48e6e517ea88 (diff) | |
download | libnitrokey-f3ccdeb50255e940df0caa9b9cc5b232b5e2fbf8.tar.gz libnitrokey-f3ccdeb50255e940df0caa9b9cc5b232b5e2fbf8.tar.bz2 |
TOTP python tests
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r-- | NitrokeyManager.cc | 2 | ||||
-rw-r--r-- | build/test.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 5955330..d35e333 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -153,7 +153,7 @@ namespace nitrokey{ return (const char *) get_slot_name(slot_number); } - uint8_t *NitrokeyManager::get_slot_name(uint8_t slot_number) const { + uint8_t *NitrokeyManager::get_slot_name(uint8_t slot_number) const { //FIXME -const s/uint/char:string auto payload = get_payload<GetSlotName>(); payload.slot_number = slot_number; auto resp = GetSlotName::CommandTransaction::run(*device, payload); diff --git a/build/test.py b/build/test.py index fa3a863..9d967ca 100644 --- a/build/test.py +++ b/build/test.py @@ -47,7 +47,7 @@ if __name__ == "__main__": s.append(C.NK_get_hotp_code(i)) print(repr(s)) print((s)) - C.NK_set_debug(True) + # C.NK_set_debug(True) s = [] C.NK_write_hotp_slot(1, 'python_test', '12345678901234567890', 0, '123123123') @@ -55,3 +55,6 @@ if __name__ == "__main__": for i in range(3): s.append(C.NK_get_hotp_code(1)) print((s)) + C.NK_set_debug(True) + C.NK_write_totp_slot(1, 'python_test', '12345678901234567890', 30, '123123123') + print ( C.NK_get_totp_code(1, 59, 0, 30) )
\ No newline at end of file |