Files
UpAndDown/src/entities/User.cpp
T
2025-10-04 15:25:56 +03:00

45 lines
740 B
C++

#include <iostream>
#include <string>
#include "User.h"
using namespace std;
namespace uad
{
const string& User::GetUUID() const noexcept
{
return uuid_;
}
void User::SetUUID(const string& new_uuid)
{
uuid_ = new_uuid;
}
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));
}
void User::SetHashedPassword(const std::string& hashed_password)
{
hashed_password_ = hashed_password;
}
const string& User::GetHashedPassword() const noexcept
{
return hashed_password_;
}
}