PDA

View Full Version : How to encrypt password using bcrypt.



mikajlo
15th March 2014, 10:56
Hi,
I wonder how I can use bcrypt to encryption my data - passwords ?
I found old topic (link (http://www.qtcentre.org/threads/51806-BCrypt-How-To-Crypt-Users-Password)) but there no definite answer.

I found also bcrypt implementation in C on github (link (https://github.com/rg3/bcrypt)) but maybe exists some other cryptography's library for Qt ?

Best,
Mikael .)

anda_skoa
15th March 2014, 15:36
There is a crypto library for Qt called QCA
http://delta.affinix.com/qca/
https://github.com/JPNaude/dev_notes/wiki/Using-the-Qt-Cryptographic-Architecture-with-Qt5

Cheers,
_

mikajlo
15th March 2014, 18:12
@anda_skoa - thx, I found QCA for Qt4 only..

ChrisW67
16th March 2014, 08:30
You can build and use the bcrypt code you linked to with a little bit of juggling of data into and out of Qt objects as needed. If password hashing is all you require it is a simple and straightforward option. Another option is to use QCryptographicHash along with a salt value.