aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-09-03 09:38:54 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-09-03 09:38:54 +0000
commit59ec6cdc69c4087ae3e666730a0154364bc20b56 (patch)
tree2b8c8270da126478b742aec8d20e91bab951040c /src
parent6aa29f3cf73b93797076b5bec4a220c08dc765fb (diff)
downloadqxmpp-59ec6cdc69c4087ae3e666730a0154364bc20b56.tar.gz
expose generateRandomInteger function
Diffstat (limited to 'src')
-rw-r--r--src/QXmppUtils.cpp2
-rw-r--r--src/QXmppUtils.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/QXmppUtils.cpp b/src/QXmppUtils.cpp
index 8b560cc3..d4865ce5 100644
--- a/src/QXmppUtils.cpp
+++ b/src/QXmppUtils.cpp
@@ -220,7 +220,7 @@ QByteArray generateHmacSha1(const QByteArray &key, const QByteArray &text)
///
/// \param N
-static int generateRandomInteger(int N)
+int generateRandomInteger(int N)
{
Q_ASSERT(N > 0 && N <= RAND_MAX);
int val;
diff --git a/src/QXmppUtils.h b/src/QXmppUtils.h
index 1757238d..2ce37bd9 100644
--- a/src/QXmppUtils.h
+++ b/src/QXmppUtils.h
@@ -50,6 +50,7 @@ QString jidToBareJid(const QString& jid);
quint32 generateCrc32(const QByteArray &input);
QByteArray generateHmacMd5(const QByteArray &key, const QByteArray &text);
QByteArray generateHmacSha1(const QByteArray &key, const QByteArray &text);
+int generateRandomInteger(int N);
QByteArray generateRandomBytes(int length);
QString generateStanzaHash(int length=32);