#include <stdio.h>
#include <string.h>
#include <time.h>
+#include <ctype.h>
#include <yubikey.h>
int ykp_AES_key_from_hex(YKP_CONFIG *cfg, const char *hexkey) {
char aesbin[256];
- unsigned long int aeslong;
/* Make sure that the hexkey is exactly 32 characters */
if (strlen(hexkey) != 32) {
writer(str_modhex_prefix,
strlen(str_key_value_separator),
userdata);
- yubikey_modhex_encode(buffer, cfg->ykcore_config.fixed, cfg->ykcore_config.fixedSize);
+ yubikey_modhex_encode(buffer, (char *)cfg->ykcore_config.fixed, cfg->ykcore_config.fixedSize);
writer(buffer, strlen(buffer), userdata);
writer("\n", 1, userdata);
writer(str_hex_prefix,
strlen(str_key_value_separator),
userdata);
- yubikey_hex_encode(buffer, cfg->ykcore_config.uid, UID_SIZE);
+ yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.uid, UID_SIZE);
writer(buffer, strlen(buffer), userdata);
writer("\n", 1, userdata);
writer(str_hex_prefix,
strlen(str_key_value_separator),
userdata);
- yubikey_hex_encode(buffer, cfg->ykcore_config.key, KEY_SIZE);
+ yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.key, KEY_SIZE);
writer(buffer, strlen(buffer), userdata);
writer("\n", 1, userdata);
writer(str_hex_prefix,
strlen(str_key_value_separator),
userdata);
- yubikey_hex_encode(buffer, cfg->ykcore_config.accCode, ACC_CODE_SIZE);
+ yubikey_hex_encode(buffer, (char *)cfg->ykcore_config.accCode, ACC_CODE_SIZE);
writer(buffer, strlen(buffer), userdata);
writer("\n", 1, userdata);