summaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-09-08 16:05:11 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-09-08 16:48:36 +0200
commitbcbb54f49fad3f4bb3e8e6aca081d9d300e74d2b (patch)
treee11e0a7458d7aae9e484722550c60292b3a6d9ba /NitrokeyManager.cc
parent49de98994f234e93cc37e2f01d2927a05880a7e7 (diff)
downloadlibnitrokey-bcbb54f49fad3f4bb3e8e6aca081d9d300e74d2b.tar.gz
libnitrokey-bcbb54f49fad3f4bb3e8e6aca081d9d300e74d2b.tar.bz2
Function for getting device's serial number in hex. Fixes #33
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 161f7aa..5b648b5 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -88,6 +88,11 @@ namespace nitrokey{
}
}
+ string NitrokeyManager::get_serial_number() {
+ auto response = GetStatus::CommandTransaction::run(*device);
+ return response.data().get_card_serial_hex();
+ }
+
string NitrokeyManager::get_status() {
auto response = GetStatus::CommandTransaction::run(*device);
return response.data().dissect();
@@ -410,4 +415,4 @@ namespace nitrokey{
return true;
}
-} \ No newline at end of file
+}