On Sun, 6 Oct 2002, Mikko Työläjärvi wrote:

>
>  tr -cd a-zA-Z0-9 < /dev/urandom | dd bs=$len count=1 2>/dev/null
>
> Which will give you $len random bytes from the set a-zA-Z0-9 (it reads
> a lot more from /dev/urandom than it produces though).

yes, and that is bad :(
It is not good to mess with /dev/[u]random more than what's really needed,
because you can exhaust the entropy pool, and that's a Bad Thing.

In your home box, for learning purposes, that's OK, but in a production box
which needs a good working prng (for crypto session keys, auth cookies and the
like) it is not acceptable to "eat" all the entropy pool unless you have
a very good reason to do so.


                        Fer

>
> Another answer is, as always, "use perl" :-)
>
>   $.02,
>   /Mikko
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to