random-bytes ( n -- byte-array ) - Factor Documentation

random-bytes ( n -- byte-array )
Generating random integers



Vocabulary
random

Inputs
n an integer


Outputs
byte-array a sequence of random bytes


Word description
Generates a byte-array of n random bytes.

Examples
USING: prettyprint random ; 5 random-bytes .
B{ 135 50 185 119 240 }


See also
random-bytes*

Definition
USING: namespaces ;

IN: random

: random-bytes ( n -- byte-array )
random-generator get random-bytes* ;

AltStyle によって変換されたページ (->オリジナル) /