SEcube open-source SDK
Public Member Functions | Private Attributes | List of all members
se_user Class Reference

The user class is used to model a user object. User's attributes are private but methods are available to retrieve them. More...

#include <SEkey.h>

Public Member Functions

 se_user (std::string &_id, std::string &_name)
 
 se_user (std::string &user_id, std::string &user_name, std::string &serialnumber, std::string &userpin, std::string &adminpin, uint32_t k1, uint32_t k2, uint32_t algo, uint32_t init_flag, int64_t cnt)
 
void set_id (std::string &new_id)
 
std::string & get_id ()
 
void set_name (std::string &new_name)
 
void add_group (std::string &group)
 
void print_user_details (std::ofstream &sekey_log)
 
std::string & get_sn ()
 

Private Attributes

std::string id
 
std::string name
 
std::string sn
 
std::string user_pin
 
std::string admin_pin
 
std::string algorithm
 
uint32_t k1
 
uint32_t k2
 
uint32_t init
 
int64_t update_cnt
 
std::vector< std::string > groups
 

Detailed Description

The user class is used to model a user object. User's attributes are private but methods are available to retrieve them.

Member Function Documentation

◆ add_group()

void se_user::add_group ( std::string &  group)

Add a group to the list of the groups to which the user belongs.

◆ get_id()

string & se_user::get_id ( )

Retrieve the ID of the user.

◆ print_user_details()

void se_user::print_user_details ( std::ofstream &  sekey_log)

used for debugging purpose

◆ set_id()

void se_user::set_id ( std::string &  new_id)

Set the ID of the user.

◆ set_name()

void se_user::set_name ( std::string &  new_name)

Set the name of the user.

Member Data Documentation

◆ admin_pin

std::string se_user::admin_pin
private

The PIN of the SEcube to login with high privilege (admin mode, never disclosed to the user by the administrator).

◆ algorithm

std::string se_user::algorithm
private

Algorithm used by the administrator to encrypt the SEkey updates for this user.

◆ groups

std::vector<std::string> se_user::groups
private

List of groups to which the user belongs.

◆ id

std::string se_user::id
private

ID of the user

◆ init

uint32_t se_user::init
private

Flag that tells if the user SEcube is initialized or not.

◆ k1

uint32_t se_user::k1
private

ID of the key used to encrypt updates.

◆ k2

uint32_t se_user::k2
private

ID of the key used to encrypt keys to be written inside the updates.

◆ name

std::string se_user::name
private

Name of the user.

◆ sn

std::string se_user::sn
private

Serial number of the SEcube of the user.

◆ update_cnt

int64_t se_user::update_cnt
private

Ascending identifier of records written inside SEkey update files.

◆ user_pin

std::string se_user::user_pin
private

The PIN of the SEcube to login with low privilege (user mode, always disclosed to the user by the administrator).


The documentation for this class was generated from the following files: