summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NitrokeyManager.cc6
-rw-r--r--include/NitrokeyManager.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index b12895d..c5259d2 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -406,16 +406,16 @@ namespace nitrokey{
return false;
}
- void NitrokeyManager::change_user_PIN(char *current_PIN, char *new_PIN) {
+ void NitrokeyManager::change_user_PIN(const char *current_PIN, const char *new_PIN) {
change_PIN_general<ChangeUserPin, PasswordKind::User>(current_PIN, new_PIN);
}
- void NitrokeyManager::change_admin_PIN(char *current_PIN, char *new_PIN) {
+ void NitrokeyManager::change_admin_PIN(const char *current_PIN, const char *new_PIN) {
change_PIN_general<ChangeAdminPin, PasswordKind::Admin>(current_PIN, new_PIN);
}
template <typename ProCommand, PasswordKind StoKind>
- void NitrokeyManager::change_PIN_general(char *current_PIN, char *new_PIN) {
+ void NitrokeyManager::change_PIN_general(const char *current_PIN, const char *new_PIN) {
switch (device->get_device_model()){
case DeviceModel::PRO:
{
diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h
index 03f1a86..f0cab68 100644
--- a/include/NitrokeyManager.h
+++ b/include/NitrokeyManager.h
@@ -53,8 +53,8 @@ namespace nitrokey {
const char * get_totp_slot_name(uint8_t slot_number);
const char * get_hotp_slot_name(uint8_t slot_number);
- void change_user_PIN(char *current_PIN, char *new_PIN);
- void change_admin_PIN(char *current_PIN, char *new_PIN);
+ void change_user_PIN(const char *current_PIN, const char *new_PIN);
+ void change_admin_PIN(const char *current_PIN, const char *new_PIN);
void enable_password_safe(const char *user_pin);
@@ -141,7 +141,7 @@ namespace nitrokey {
const char * get_slot_name(uint8_t slot_number);
template <typename ProCommand, PasswordKind StoKind>
- void change_PIN_general(char *current_PIN, char *new_PIN);
+ void change_PIN_general(const char *current_PIN, const char *new_PIN);
void write_HOTP_slot_authorize(uint8_t slot_number, const char *slot_name, const char *secret, uint64_t hotp_counter,
bool use_8_digits, bool use_enter, bool use_tokenID, const char *token_ID,