From 98b27cb58b12f699b5c11f88d55c3e3f70ed2063 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 31 Oct 2016 18:02:55 +0100 Subject: Code refactoring - unify password only commands (2) Signed-off-by: Szczepan Zalega --- include/command.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/command.h') diff --git a/include/command.h b/include/command.h index badf068..0a875e4 100644 --- a/include/command.h +++ b/include/command.h @@ -22,7 +22,8 @@ namespace nitrokey { namespace stick20{ enum class PasswordKind : uint8_t { User = 'P', - Admin = 'A' + Admin = 'A', + AdminPrefixed }; template @@ -41,6 +42,9 @@ namespace stick20{ void set_kind_admin() { kind = (uint8_t) 'A'; } + void set_kind_admin_prefixed() { + kind = (uint8_t) 'P'; + } void set_kind_user() { kind = (uint8_t) 'P'; } @@ -57,6 +61,9 @@ namespace stick20{ case PasswordKind::User: set_kind_user(); break; + case PasswordKind::AdminPrefixed: + set_kind_admin_prefixed(); + break; } }; -- cgit v1.2.1