From 6b3dc7faad567f732764e7e5ff3397d945ef998f Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 26 Feb 2010 14:40:42 +0000 Subject: increase length of random string generator to reduce collision risks --- source/QXmppUtils.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/QXmppUtils.cpp') 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)]; } -- cgit v1.2.3