mirror of https://github.com/mkerrisk/man-pages
getrandom.2: Clarify sentence on getrandom() and partial GRND_RANDOM reads
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
978323c72e
commit
28ef3452e4
|
@ -224,7 +224,7 @@ is not specified and
|
||||||
.I buflen
|
.I buflen
|
||||||
is less than or equal to 256,
|
is less than or equal to 256,
|
||||||
a return of fewer bytes than requested should never happen,
|
a return of fewer bytes than requested should never happen,
|
||||||
but the careful user-space code should check for this anyway!
|
but the careful programmer will check for this anyway!
|
||||||
.SS Choice of random device
|
.SS Choice of random device
|
||||||
Unless you are doing long-term key generation (and perhaps not even
|
Unless you are doing long-term key generation (and perhaps not even
|
||||||
then), you probably shouldn't be using
|
then), you probably shouldn't be using
|
||||||
|
@ -235,9 +235,11 @@ are quite conservative, and so should be sufficient for all purposes.
|
||||||
The disadvantage of
|
The disadvantage of
|
||||||
.B GRND_RANDOM
|
.B GRND_RANDOM
|
||||||
is that it can block.
|
is that it can block.
|
||||||
Furthermore, dealing with partially fulfilled
|
Furthermore, dealing with the partially fulfilled
|
||||||
.BR getrandom ()
|
.BR getrandom ()
|
||||||
requests increases code complexity.
|
requests that can occur when using
|
||||||
|
.B GRND_RANDOM
|
||||||
|
increases code complexity.
|
||||||
.SS Emulating OpenBSD's getentropy()
|
.SS Emulating OpenBSD's getentropy()
|
||||||
The
|
The
|
||||||
.BR getentropy ()
|
.BR getentropy ()
|
||||||
|
|
Loading…
Reference in New Issue