protected override void HashCore(byte[] rgb, int ibStart, int cbSize) { State = 1; sha.HashCore(rgb, ibStart, cbSize); }
protected override void HashCore(byte[] rgb, int start, int size) { State = 1; sha.HashCore(rgb, start, size); }
public static byte[] ComputeHash(byte[] bytes) { var sha = new SHA1Internal(); sha.HashCore(bytes, 0, bytes.Length); return sha.HashFinal(); }
public static byte[] ComputeHash(Stream stream) { var sha = new SHA1Internal(); var buffer = new byte[4096]; var len = stream.Read(buffer, 0, 4096); while (len > 0) { sha.HashCore(buffer, 0, len); len = stream.Read(buffer, 0, 4096); } return sha.HashFinal(); }
void IRunningHash.TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount) { sha.HashCore(inputBuffer, inputOffset, inputCount); }