Re: Equivalent of get_random_bytes?
Re: Equivalent of get_random_bytes?
- Subject: Re: Equivalent of get_random_bytes?
- From: Peter Lei <email@hidden>
- Date: Thu, 19 Apr 2007 15:50:56 -0500
Just a heads up that I have previously reported a bug in
read_random() as it only returns random data in the first
20 bytes of the buffer that is given when "numbytes"
requested is greater than 20 bytes. At least in 10.4.x.
--peter
Alex v. Below wrote:
Thanks,
no, read_random() is what I was looking for
Alex
Am 19.04.2007 um 22:11 schrieb Paul Nelson:
I think this is what the poster had in mind:
openssl rand -out foo.dat 1024
makes a file containing 1024 bytes
You can also base64 it:
openssl rand -base64 1024 | wc
Also, see 'man rand'
Paul Nelson
Thursby Software Systems, Inc.
on 4/19/07 2:45 PM, Michael Smith at email@hidden wrote:
is there an equivalent for Linux' get_random_bytes (1) other than
reading /dev/random on darwin?
If you are inside the kernel, the BSD symbolset exports read_random()
in <sys/random.h>.
In userspace, just read from /dev/random.
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden