protected virtual unsafe void SalsaRound(uint[] x) { fixed(uint *p = x) { Salsa20Utils.SalsaRound(p, Rounds); } }
protected override unsafe void UpdateKeyStream() { fixed(uint *x = State) fixed(byte *s = KeyStream) { Salsa20Utils.UpdateKeyStream(x, s, Rounds); } }
protected override unsafe void UpdateKeyStream() { if (IsSupport) { if (Sse2.IsSupported) { fixed(uint *x = State) fixed(byte *s = KeyStream) { Salsa20Utils.UpdateKeyStream(x, s, Rounds); } return; } } Salsa20Utils.UpdateKeyStream(Rounds, State, KeyStream); }
protected override unsafe void UpdateBlocks(ref uint *state, ref byte *source, ref byte *destination, ref int length) { if (Avx.IsSupported && Avx2.IsSupported) { if (length >= 512) { Salsa20Utils.SalsaCore512(Rounds, state, ref source, ref destination, ref length); } while (length >= 128) { Salsa20Utils.SalsaCore128(Rounds, state, source, destination); source += 128; destination += 128; length -= 128; } } if (Sse2.IsSupported) { if (length >= 256) { Salsa20Utils.SalsaCore256(Rounds, state, ref source, ref destination, ref length); } while (length >= 64) { Salsa20Utils.SalsaCore64(Rounds, state, source, destination); source += 64; destination += 64; length -= 64; } } }
protected override void SalsaRound(uint[] x) { Salsa20Utils.SalsaRound(Rounds, x); }
protected override void UpdateKeyStream() { Salsa20Utils.UpdateKeyStream(Rounds, State, KeyStream); }
protected override unsafe void SnuffleCore512(uint *state, ref byte *source, ref byte *destination, ref int length) { Salsa20Utils.SalsaCore512(Rounds, state, ref source, ref destination, ref length); }
protected override unsafe void SnuffleCore128(uint *state, byte *source, byte *destination) { Salsa20Utils.SalsaCore128(Rounds, state, source, destination); }