#ifndef __PROTOCOL_CONTROLLER_USER_H_
#define __PROTOCOL_CONTROLLER_USER_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <time.h>

#include "config/config.h"

#include "models/user.h"
#include "models/verifier.h"
#include <openssl/rand.h>
#include "system.h"
#include "helpers/aes_helper.h"

#include "lib/pcsc/reader.h"

#include "lib/apdu/command.h"

#include "helpers/multosio.h"

/**
 * Gets the user identifier using the specified reader.
 *
 * @param reader the reader to be used
 * @param identifier the user identifier
 * @return 0 if success else -1
 */
extern int ue_get_user_identifier(user_identifier_t *identifier);

extern int ue_generate_nonce(user_nonce_t *nonce);

extern int ue_show(user_identifier_t ue_identifier, verifier_identifier_t ve_identifier, user_nonce_t ue_nonce, verifier_nonce_t ve_nonce, user_private_key_t ue_private_key, user_cipher_output_t *ue_cipher_output);


/// přidaný
extern int ue_connect(reader_t *reader, user_identifier_t *identifier);

extern int ue_set_user_private_key(reader_t *reader, user_private_key_t *ue_private_key);

extern int ue_get_user_nonce(reader_t *reader, user_nonce_t *ue_nonce);

extern int ue_set_verifier_identifier(reader_t *reader, verifier_identifier_t *identifier);

extern int ue_set_verifier_nonce(reader_t *reader,verifier_nonce_t *nonce);

extern int ue_show_K(reader_t *reader,user_cipher_output_t *ue_cipher_output);

extern int ue_get_user_data(reader_t *reader);

#ifdef __cplusplus
}
#endif

#endif /* __PROTOCOL_CONTROLLER_USER_H_ */
