generated from Sithas/conan_template
Доработка интерфейса ДАО
This commit is contained in:
+16
-5
@@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user