Joe Orton wrote: > On Thu, Oct 30, 2003 at 03:52:41PM +0000, Ben Laurie wrote: > >>Ben Laurie wrote: >> >> >>>Comments? >>> >>>Note that this supplies the underlying PRNG - I anticipate wrapping it >>>up in a daemon for normal use. As discussed with some members of the >>>team, we think that should be a sub-project of APR, apr-prngd. >>> >>>Note that for some applications, direct access to the PRNG makes sense. >>>Also note that it isn't currenly thread-safe. >> >>Doh! Patch attached... >> >>I should also note that the core PRNG is a work in progress, I may >>change it yet, but the API shouldn't change. > > > How will this be used to replace the apr_generate_random_bytes > interface, or is this just to be used to implement a daemon accessed via > the EGD interface (or something like that)?
The latter is the general idea - feeding it entropy in a general way when not daemonized would be problematic. > some technical issues: > - sha code should use apr_uint64_t etc types OK. > - code style!? So where are the emacs macros for code style? > - the odd C++ // comment Deliberate - I knew I'd get nagged about them so a good way of not dropping the ball :-) > - there's already a SHA implementation in apr-util, is > there duplication here which could be reduced? Definitely - I was not aware of that, I could look at extending that instead. > - the SHA* functions need to be namespaced if they are not static I was planning to make them static in the long run. Cheers, Ben. -- http://www.apache-ssl.org/ben.html http://www.thebunker.net/ "There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff
