aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-02-26 14:40:42 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-02-26 14:40:42 +0000
commit6b3dc7faad567f732764e7e5ff3397d945ef998f (patch)
tree19256578a5b7120add1e775e255b9010ab5781d5
parent5c60395e9693fc3c5949fc14fa8b371cc75fe9b1 (diff)
downloadqxmpp-6b3dc7faad567f732764e7e5ff3397d945ef998f.tar.gz
increase length of random string generator to reduce collision risks
-rw-r--r--source/QXmppUtils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/QXmppUtils.cpp b/source/QXmppUtils.cpp
index 9219a74e..256a4beb 100644
--- a/source/QXmppUtils.cpp
+++ b/source/QXmppUtils.cpp
@@ -86,10 +86,9 @@ QString jidToBareJid(const QString& jid)
QString generateStanzaHash()
{
-
QString somechars = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
QString hashResult;
- for ( int idx = 0; idx < 10; ++idx )
+ for ( int idx = 0; idx < 32; ++idx )
{
hashResult += somechars[(qrand() % 61)];
}