aboutsummaryrefslogtreecommitdiff
path: root/include/dissect.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-18 18:04:34 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:45 +0200
commita5d11eab6003a6ed0f7c78ecb7136b28ee938a23 (patch)
treefa1c5a1a476f51161b822188508704c5acd52a1d /include/dissect.h
parent209672f9bba667ea0fc7bce364ef0ad1c8bc4d2a (diff)
downloadlibnitrokey-a5d11eab6003a6ed0f7c78ecb7136b28ee938a23.tar.gz
libnitrokey-a5d11eab6003a6ed0f7c78ecb7136b28ee938a23.tar.bz2
Initial version of C/Python bindings
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/dissect.h')
-rw-r--r--include/dissect.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/dissect.h b/include/dissect.h
index 993d348..ab94e62 100644
--- a/include/dissect.h
+++ b/include/dissect.h
@@ -5,6 +5,7 @@
#define DISSECT_H
#include <string>
#include <sstream>
+#include <iomanip>
#include "misc.h"
#include "cxx_semantics.h"
#include "command_id.h"
@@ -66,7 +67,8 @@ class ResponseDissector : semantics::non_constructible {
<< status[pod.device_status] << std::endl;
out << "Command ID:\t" << commandid_to_string((CommandID)(pod.command_id))
<< std::endl;
- out << "Last command CRC:\t" << pod.last_command_crc << std::endl;
+ out << "Last command CRC:\t" << std::hex << std::setw(2) << std::setfill('0')
+ << pod.last_command_crc << std::endl;
out << "Last command status:\t" << pod.last_command_status + 0 << " "
<< cmd[pod.last_command_status] << std::endl;
out << "CRC:\t" << pod.crc << std::endl;