online casino

Archive for October, 2011

Qt Joomla Password Generator.

     This is how I generate joomla like salt for passwords and how I implement them in my programs for joomla interpolarity.

QString clSettings::createrandomsalt(int maxVal)
{
    //48-57 - Numbers 0-9
    //65-90 - Uppercase letters A-Z
    //97-122 - Lowercase letters a-z

    QString strSalt = NULL;
    int rndNum = 0;
    for (int i = 0; i < maxVal; i++)
    {
        numGen:
        rndNum = qrand() % (122 + 48);

        if ((rndNum > 48 && rndNum < 57) || (rndNum > 65 && rndNum < 90) || (rndNum > 97 && rndNum < 122))
        {
            strSalt += (char*)&rndNum;
        } else { goto numGen; }
    }
    return strSalt;
}

void clSettings::givemepwd(QString tmpPassword)
{
    QString strSalt = createrandomsalt(32);
    QString str_password = tmpPassword + strSalt;
    QByteArray hash = QCryptographicHash::hash(str_password.toUtf8(), QCryptographicHash::Md5);
    str_password = hash.toHex().append(":" + strSalt);
}

hash for “password” with random string “lIJEeW3yIs8los8bGVFfYT67YySX2CKh” .
output:

0626dada27ff423156ae0962d7d9a4f2:lIJEeW3yIs8los8bGVFfYT67YySX2CKh


, , , ,

No Comments

how to create an oracle berkeley database

     How to create an oracle berkeley database.

Read the rest of this entry »

, , , ,

No Comments

Sony Alpha 100 USB cable pin out (DSLR-A100)

     This is the reatail USB Cable that comes with the Sony Alphas 100 just in case you lost your cable you can make one out of this pictures. Do you know the name of this connector? (digi-key part#)
Read the rest of this entry »

No Comments

gphoto2 and Sony Alpha 100 (DSLR-A100)

     trying to get my Sony alpha 100 to do time lapse photography using USB PTP mode. I have upgraded my camera firmware from 1.02 to 1.04 from Sony’s Official Site (link here)
Read the rest of this entry »

, , , , , , ,

No Comments