Vessel edit dialog
This commit is contained in:
parent
9686b96d8a
commit
eb097588ba
21 changed files with 589 additions and 97 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue