in
{
static if (xsalsa)
{
assert (key.length == 32, "XSalsa requires a 256 bit key.");
assert (iv.length == 24, "XSalsa needs a 192 bit nonce.");
}
else
{
assert (key.length == 16 || key.length == 32, "Salsa20 needs 128 or 256 bit keys.");
assert (iv.length == 8, "Salsa20 needs a 8 byte IV.");
}
}
Initialize the cipher.