aboutsummaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-28 14:34:44 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:58 +0200
commit349b7b65583ec2366511823b0c0f3bac3c23d642 (patch)
tree3cf98e76e7b96148cd3e5d78d6e6370faccd61ac /NitrokeyManager.cc
parent9550d13642b6ef374d3807357b2f7a26bd0cad59 (diff)
downloadlibnitrokey-349b7b65583ec2366511823b0c0f3bac3c23d642.tar.gz
libnitrokey-349b7b65583ec2366511823b0c0f3bac3c23d642.tar.bz2
Fix HOTP slots count -> 15
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 3697369..79cd868 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -90,7 +90,7 @@ namespace nitrokey{
bool NitrokeyManager::is_valid_hotp_slot_number(uint8_t slot_number) const { return slot_number < 3; }
- bool NitrokeyManager::is_valid_totp_slot_number(uint8_t slot_number) const { return slot_number < 0x10; }
+ bool NitrokeyManager::is_valid_totp_slot_number(uint8_t slot_number) const { return slot_number < 0x10-1; } //15
uint8_t NitrokeyManager::get_internal_slot_number_for_totp(uint8_t slot_number) const { return (uint8_t) (0x20 + slot_number); }
uint8_t NitrokeyManager::get_internal_slot_number_for_hotp(uint8_t slot_number) const { return (uint8_t) (0x10 + slot_number); }