public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV) { if (rgbKey == null) throw new ArgumentNullException("rgbKey"); if (!ValidKeySize(rgbKey.Length * 8)) throw new CryptographicException("Invalid key size; it must be 128 or 256 bits."); CheckValidIV(rgbIV, "rgbIV"); return new Salsa20CryptoTransform(rgbKey, rgbIV, m_rounds); }