Salsa
@safe
struct Salsa (
uint rounds = 20
bool xsalsa = false
)
if (
rounds == 12 ||
rounds == 20
) {
enum name;
enum name;
}
A destructor is present on this object, but not explicitly documented in the source.
- processBytes
ubyte[] processBytes(in ubyte[] input, ubyte[] output)
Encrypt or decrypt input bytes (but no more than 2^70 bytes!).
- start
void start(bool forEncryption, in ubyte[] key, in ubyte[] iv)
- block
void block(in uint[] input, uint[] output)
- initState
void initState(ref uint[16] state, in ubyte[] keyBytes, in uint counter, in ubyte[] ivBytes)
implementation of the Salsa20/20 stream cipher