Archive for October, 2011
Qt Joomla Password Generator.
Posted by admin in Uncategorized on October 31, 2011
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
how to create an oracle berkeley database
Posted by admin in Programming on October 15, 2011
How to create an oracle berkeley database.
Sony Alpha 100 USB cable pin out (DSLR-A100)
Posted by admin in Uncategorized on October 14, 2011
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 »
gphoto2 and Sony Alpha 100 (DSLR-A100)
Posted by admin in Uncategorized on October 12, 2011
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 »