Доработка интерфейса ДАО

This commit is contained in:
Антон
2025-08-29 18:33:53 +03:00
parent 60339d9195
commit 1a1fd07d55
7 changed files with 46 additions and 12 deletions
+16 -5
View File
@@ -1,28 +1,39 @@
#include <iostream>
#include <string>
#include "User.h"
using namespace std;
namespace uad
{
const std::string& User::GetGUID() const noexcept
const string& User::GetGUID() const noexcept
{
return guid_;
}
void User::SetGUID(const std::string& new_guid)
void User::SetGUID(const string& new_guid)
{
guid_ = new_guid;
}
const std::string& User::GetLogin() const noexcept
const string& User::GetLogin() const noexcept
{
return login_;
}
void User::SetLogin(const std::string& login)
void User::SetLogin(const string& login)
{
login_ = login;
}
const std::string& User::GetHashedPassword() const noexcept
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_;
}