generated from Sithas/conan_template
40 lines
632 B
C++
40 lines
632 B
C++
#include <iostream>
|
|
#include <string>
|
|
|
|
#include "User.h"
|
|
|
|
using namespace std;
|
|
|
|
namespace uad
|
|
{
|
|
const string& User::GetGUID() const noexcept
|
|
{
|
|
return guid_;
|
|
}
|
|
|
|
void User::SetGUID(const string& new_guid)
|
|
{
|
|
guid_ = new_guid;
|
|
}
|
|
|
|
const string& User::GetLogin() const noexcept
|
|
{
|
|
return login_;
|
|
}
|
|
|
|
void User::SetLogin(const string& login)
|
|
{
|
|
login_ = login;
|
|
}
|
|
|
|
void User::SetPassword(const string& password)
|
|
{
|
|
size_t calculated_hash = hash<string>{}(password);
|
|
hashed_password_ = ToHex((byte*)&calculated_hash, sizeof(calculated_hash));
|
|
}
|
|
|
|
const string& User::GetHashedPassword() const noexcept
|
|
{
|
|
return hashed_password_;
|
|
}
|
|
} |