コード例 #1
0
ファイル: settings.cpp プロジェクト: RallyWRT/qtapplications
void Settings::setDBServerUserPassword(const QString &userPassword){
    QByteArray *destination = new QByteArray();
    Cryptography cryptography;
    cryptography.teaCrypto(destination, userPassword.toUtf8(), key, true);
    setValue("Database/Password", *destination);
    delete destination;
}
コード例 #2
0
ファイル: settings.cpp プロジェクト: RallyWRT/qtapplications
void Settings::setRecentUserPassword(const QString &password){

    QByteArray *destination = new QByteArray();
    Cryptography cryptography;
    cryptography.teaCrypto(destination, password.toUtf8(), key, true);
    setValue("MainWindow/RecentUserPassword", *destination);
    delete destination;

}
コード例 #3
0
ファイル: settings.cpp プロジェクト: RallyWRT/qtapplications
QString Settings::getDBServerUserName() const{
    QString userName = "";
    QByteArray userNameArray = value("Database/UserName").toByteArray();
    if(userNameArray.isEmpty()){
        userName = REMOTE_SITOY_COMPUTERS_DB_USER_NAME;
    }else{
        QByteArray *destination = new QByteArray();
        Cryptography cryptography;
        cryptography.teaCrypto(destination, userNameArray, key, false);
        userName = QString(*destination);
        delete destination;

    }
    return userName;
}
コード例 #4
0
ファイル: settings.cpp プロジェクト: RallyWRT/qtapplications
QString Settings::getDBServerUserPassword() const{
    QString password = "";
    QByteArray passwordArray = value("Database/Password").toByteArray();
    if(passwordArray.isEmpty()){
        password = REMOTE_SITOY_COMPUTERS_DB_USER_PASSWORD;
    }else{
        QByteArray *destination = new QByteArray();
        Cryptography cryptography;
        cryptography.teaCrypto(destination, passwordArray, key, false);
        password = QString(*destination);
        delete destination;

    }
    return password;
}
コード例 #5
0
ファイル: settings.cpp プロジェクト: RallyWRT/qtapplications
QString Settings::getRecentUserPassword() const{

    QByteArray passwordArray = value("MainWindow/RecentUserPassword").toByteArray();
    if(!passwordArray.isEmpty()){

        QByteArray *destination = new QByteArray();
        Cryptography cryptography;
        cryptography.teaCrypto(destination, passwordArray, key, false);
        passwordArray = *destination;
        delete destination;

    }

    return QString(passwordArray);

}