Files
UpAndDown/src/entities/User.cpp
T
2025-08-29 18:33:53 +03:00

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_;
}
}