diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-02-26 14:40:42 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-02-26 14:40:42 +0000 |
| commit | 6b3dc7faad567f732764e7e5ff3397d945ef998f (patch) | |
| tree | 19256578a5b7120add1e775e255b9010ab5781d5 | |
| parent | 5c60395e9693fc3c5949fc14fa8b371cc75fe9b1 (diff) | |
| download | qxmpp-6b3dc7faad567f732764e7e5ff3397d945ef998f.tar.gz | |
increase length of random string generator to reduce collision risks
| -rw-r--r-- | source/QXmppUtils.cpp | 3 |
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)]; } |
