Vessel edit dialog

This commit is contained in:
Andrew nuark G 2020-12-23 18:43:41 +07:00
parent 9686b96d8a
commit eb097588ba
21 changed files with 589 additions and 97 deletions

View file

@ -1,10 +1,18 @@
#include "user_entity.h"
user_entity::user_entity() {
this->_id += QRandomGenerator().generate64();
}
user_entity::user_entity(const QString &login, const QString &password, UserRole role) : _login(login), _role(role) {
this->_pwd_hash = QCryptographicHash::hash(password.toLocal8Bit(), QCryptographicHash::Sha3_256);
foreach (auto bit, this->_pwd_hash) {
this->_id += bit;
}
foreach (auto bit, QCryptographicHash::hash(login.toLocal8Bit(), QCryptographicHash::Sha3_256)) {
this->_id += bit;
}
this->_id += QRandomGenerator().generate64();
}