NeedsInput()
public void SetInput(byte[] buffer, int offset, int count) { if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } if (offset < 0) { throw new ArgumentOutOfRangeException(nameof(offset)); } if (count < 0) { throw new ArgumentOutOfRangeException(nameof(count)); } if (inputOff < inputEnd) { throw new InvalidOperationException("Old input was not completely processed"); } int end = offset + count; /* We want to throw an ArrayIndexOutOfBoundsException early. The * check is very tricky: it also handles integer wrap around. */ if ((offset > end) || (end > buffer.Length)) { throw new ArgumentOutOfRangeException(nameof(count)); } inputBuf = buffer; inputOff = offset; inputEnd = end; }
public void SetInput(byte[] input, int offset, int count) { if ((state & 8) != 0) { throw new InvalidOperationException("Finish() already called"); } engine.SetInput(input, offset, count); }