Salsa.processBytes

Encrypt or decrypt input bytes (but no more than 2^70 bytes!).

struct Salsa(uint rounds = 20, bool xsalsa = false)
@nogc nothrow
ubyte[]
processBytes
(
in ubyte[] input
,
ubyte[] output
)
in { assert (output.length >= input.length, "output buffer too short"); assert (initialized, "Salsa20Engine not initialized!"); }
if (
rounds == 12 ||
rounds == 20
)

Parameters

input
Type: ubyte[]

input bytes

output
Type: ubyte[]

buffer for output bytes. length must match input length.

Return Value

Type: ubyte[]

Slice pointing to processed data which might be smaller than output.

Throws

Error if limit of 2^70 bytes is exceeded.

Meta