KApplication::randomString()

Brad Hards bradh at frogmouth.net
Wed Sep 7 02:57:31 BST 2005


On Wednesday 07 September 2005 08:02 am, Daniel Molkentin wrote:
> On Tuesday, 6. September 2005 23:40, Aaron J. Seigo wrote:
> > hi...
> >
> > would anyone object to moving KApplication::randomString(int) to
> > KStringHandler? it would remove a number of gratuitous uses of
> > KApplication and put it somewhere that is a bit more findable IMHO.
>
> Update :) I've done this yesterday already :)
> random() went into a new kmath class for that matter.
If KDE adopts Qt Crypto Architecture (QCA), then maybe this is better solved 
by the QCA::Random class, which currently has randomChar(), randomInt() and 
randomArray() static member functions. I could look to renaming randomChar() 
to randomByte() and adding a randomChar() and randomString() that return 
values in reduced ranges (as randomString() currently does).

The advantage that QCA has is that you can specify how "good" a random number 
you want (eg you may not want to use the same random number generator for 
things that you know are going to become public as for something that is 
supposed to be part of a long term key).

I'd like to discuss use of QCA in the new KDE stack, but first I have to get 
over ObSickness (in my case, a cold I think I picked up on the way to 
Malaga).

Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050907/7c4b9608/attachment.sig>


More information about the kde-core-devel mailing list