[Interest] Generating unique string

igor.mironchik at gmail.com igor.mironchik at gmail.com
Sun Feb 16 11:02:05 CET 2014


Thanks guys for your answers. UUID is good enough for my task. 

From: Etienne Sandré-Chardonnal 
Sent: Sunday, February 16, 2014 10:59 AM
To: scorp1us at yahoo.com 
Cc: Interests Qt 
Subject: Re: [Interest] Generating unique string

If you don't like the uuid format, you could hash the uuid or convert its binary representation to base64




2014-02-16 6:22 GMT+01:00 scorp1us at yahoo.com <scorp1us at yahoo.com>:

        I'd suggest the uuid over the hash, unless you use a randomized hash content. Time is not good enough. Uuids are supposed to be unique, I'd use those. 

        Sent from Yahoo Mail on Android
       



------------------------------------------------------------------------------
  From: Etienne Sandré-Chardonnal <etienne.sandre at m4x.org>; 
  To: Jonathan Greig <redteam316 at gmail.com>; 
  Cc: Interests Qt <interest at qt-project.org>; 
  Subject: Re: [Interest] Generating unique string 
  Sent: Sat, Feb 15, 2014 7:57:21 AM 


        Have a look also to this : http://qt-project.org/doc/qt-4.8/quuid.html


        Etienne




        2014-02-15 7:58 GMT+01:00 Jonathan Greig <redteam316 at gmail.com>:

          Igor,
          You might want to look at QCryptographicHash and then truncate or concatenate to N chars. Either that or QDateTime using the epoch. Your solution depends on how you are defining unique. Either way should be fairly simple.




          On Sat, Feb 15, 2014 at 1:49 AM, <igor.mironchik at gmail.com> wrote:

            Hi.

            Does Qt have something for generating unique string of N chars?

            Or maybe does somebody know simple way to do it?

            Thanks.

            _______________________________________________
            Interest mailing list
            Interest at qt-project.org
            http://lists.qt-project.org/mailman/listinfo/interest




          _______________________________________________
          Interest mailing list
          Interest at qt-project.org
          http://lists.qt-project.org/mailman/listinfo/interest


       




--------------------------------------------------------------------------------
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140216/7ffa3b59/attachment.html>


More information about the Interest mailing list