prg

Generate a pseudo random sequence from a given seed.

package @safe @nogc pure nothrow
void
prg
(
ubyte[] outBuf
,
in ubyte[32] seed
)

Parameters

outBuf
Type: ubyte[]

Output buffer of desired length.

seed
Type: ubyte[32]

Secret key.

Examples

Test prg().

1 t {
2 	ubyte[32] seed = 0;
3 	ubyte[96] expanded;
4 	
5 	prg(expanded, seed);
6 	assert(expanded == x"
7 		9bf49a6a0755f953811fce125f2683d50429c3bb49e074147e0089a52eae155f
8 		0564f879d27ae3c02ce82834acfa8c793a629f2ca0de6919610be82f411326be
9 		0bd58841203e74fe86fc71338ce0173dc628ebb719bdcbcc151585214cc089b4",
10 		"prg() failed"

Meta