Salsa.initState

struct Salsa(uint rounds = 20, bool xsalsa = false)
@nogc nothrow static
void
initState
nothrow @nogc
(
ref uint[16] state
,
in ubyte[] keyBytes
,
in uint counter
,
in ubyte[] ivBytes
)
in { assert (keyBytes.length == 16 || keyBytes.length == 32, "invalid key length"); assert (ivBytes.length == 8, "invalid iv length"); }
if (
rounds == 12 ||
rounds == 20
)

Parameters

keyBytes
Type: ubyte[]

key, 16 or 32 bytes.

ivBytes
Type: ubyte[]

iv, exactly 8 bytes.

Meta