|
28 | 28 | #include "stick10_commands.h" |
29 | 29 | #include "stick10_commands_0.8.h" |
30 | 30 | #include "stick20_commands.h" |
| 31 | +#include <cstddef> |
31 | 32 | #include <vector> |
32 | 33 | #include <memory> |
33 | 34 | #include <unordered_map> |
@@ -64,6 +65,54 @@ char * strndup(const char* str, size_t maxlen); |
64 | 65 | stick10::ReadSlot::ResponsePayload get_TOTP_slot_data(const uint8_t slot_number); |
65 | 66 | stick10::ReadSlot::ResponsePayload get_HOTP_slot_data(const uint8_t slot_number); |
66 | 67 |
|
| 68 | + /** |
| 69 | + * Returns the number of PWS slots provided by the connected device or |
| 70 | + * zero if no device is connected. |
| 71 | + */ |
| 72 | + uint8_t get_pws_slot_count(); |
| 73 | + |
| 74 | + /** |
| 75 | + * Returns the maximum length of a PWS slot name in bytes for the |
| 76 | + * connected device or zero if no device is connected. |
| 77 | + */ |
| 78 | + size_t get_pws_name_length(); |
| 79 | + |
| 80 | + /** |
| 81 | + * Returns the maximum length of a PWS login in bytes for the connected |
| 82 | + * device or zero if no device is connected. |
| 83 | + */ |
| 84 | + size_t get_pws_login_length(); |
| 85 | + |
| 86 | + /** |
| 87 | + * Returns the maximum length of a PWS password in bytes for the |
| 88 | + * connected device or zero if no device is connected. |
| 89 | + */ |
| 90 | + size_t get_pws_password_length(); |
| 91 | + |
| 92 | + /** |
| 93 | + * Returns the number of TOTP slots provided by the connected device or |
| 94 | + * zero if no device is connected. |
| 95 | + */ |
| 96 | + uint8_t get_totp_slot_count(); |
| 97 | + |
| 98 | + /** |
| 99 | + * Returns the number of HOTP slots provided by the connected device or |
| 100 | + * zero if no device is connected. |
| 101 | + */ |
| 102 | + uint8_t get_hotp_slot_count(); |
| 103 | + |
| 104 | + /** |
| 105 | + * Returns the maximum length of an OTP slot name in bytes for the |
| 106 | + * connected device or zero if no device is connected. |
| 107 | + */ |
| 108 | + size_t get_otp_name_length(); |
| 109 | + |
| 110 | + /** |
| 111 | + * Returns the maximum length of an OTP secret in bytes for the |
| 112 | + * connected device or zero if no device is connected. |
| 113 | + */ |
| 114 | + size_t get_otp_secret_length(); |
| 115 | + |
67 | 116 | bool set_time(uint64_t time); |
68 | 117 | /** |
69 | 118 | * Set the device time used for TOTP to the given time. Contrary to |
|
0 commit comments