-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration.cpp
63 lines (49 loc) · 1.51 KB
/
registration.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "registration.h"
#include "ui_registration.h"
#include <QCryptographicHash>
Registration::Registration(QWidget *parent) :
QDialog(parent),
ui(new Ui::Registration)
{
ui->setupUi(this);
connect(ui->lineEdit_registration_email,SIGNAL(textChanged(QString)),this,SLOT(getEmail(QString)));
connect(ui->lineEdit_registration_password,SIGNAL(textChanged(QString)),this,SLOT(getPasswordFirst(QString)));
connect(ui->lineEdit_registration_password_2,SIGNAL(textChanged(QString)),this,SLOT(getPasswordSecond(QString)));
connect(ui->lineEdit_registration_username,SIGNAL(textChanged(QString)),this,SLOT(getUsername(QString)));
}
Registration::~Registration()
{
delete ui;
}
void Registration::getEmail(QString email)
{
this->email = email;
}
void Registration::getUsername(QString username)
{
this->username = username;
}
void Registration::getPasswordFirst(QString pass)
{
this->passwordFirst = QString(QCryptographicHash::hash((pass.toUtf8()),QCryptographicHash::Md5).toHex());
}
void Registration::getPasswordSecond(QString pass)
{
this->passwordSecond = QString(QCryptographicHash::hash((pass.toUtf8()),QCryptographicHash::Md5).toHex());
}
QString Registration::getEmail()
{
return this->email;
}
QString Registration::getUsername()
{
return this->username;
}
QString Registration::getPasswordFirst()
{
return this->passwordFirst;
}
QString Registration::getPasswordSecond()
{
return this->passwordSecond;
}