It's true that the libc developers can't know why you want a random number, it's definitely also true that one size does not fit all. But the libc implementation is the worst kind of compromise as it is neither fast nor secure. If you want lots of numbers, you will get a lot better performance out of e.g. Mersenne twister, and if you want something even remotely secure, you need to use a special purpose cryptographic algorithm. As near as I can tell, the only situation you would ever want to use the libc random number generator is when you really don't care about either performace or security. Couldn't they at least have done one of the two?
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds