QNX and BLACKBERRY support
UDP Multicast for QNX git-svn-id: svn://db.shs.com.ru/pip@133 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -136,15 +136,18 @@ PIByteArray PICrypt::decrypt(const PIByteArray & crypt_data, PIByteArray key, bo
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#include <QDebug>
|
||||
PIByteArray PICrypt::hash(const PIString & secret) {
|
||||
PIByteArray hash;
|
||||
qDebug() << "hash start";
|
||||
#ifdef PIP_CRYPT
|
||||
sodium_init();
|
||||
qDebug() << "sodium_init ok";
|
||||
hash.resize(crypto_generichash_BYTES);
|
||||
PIByteArray s(secret.data(), secret.size());
|
||||
crypto_generichash(hash.data(), hash.size(), s.data(), s.size(), (const uchar*)hash_def_key, sizeof(hash_def_key) - 1);
|
||||
#endif
|
||||
qDebug() << "hash end";
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user