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;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,12 @@
|
||||
# undef PIP_MATH_Y0
|
||||
# undef PIP_MATH_Y1
|
||||
# undef PIP_MATH_YN
|
||||
# include <complex.h>
|
||||
# include <math.h>
|
||||
# ifdef BLACKBERRY
|
||||
# include <complex>
|
||||
# else
|
||||
# include <complex.h>
|
||||
# endif
|
||||
#else
|
||||
# include <complex>
|
||||
# include <cmath>
|
||||
|
||||
Reference in New Issue
Block a user