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 unsafe void SnuffleCore256(uint *state, ref byte *source, ref byte *destination, ref int length) { Salsa20Utils.SalsaCore256(Rounds, state, ref source, ref destination, ref length); }