HashCore() public method

public HashCore ( byte rgb, int ibStart, int cbSize ) : void
rgb byte
ibStart int
cbSize int
return void
 protected override void HashCore(byte[] rgb, int ibStart, int cbSize)
 {
     State = 1;
     sha.HashCore(rgb, ibStart, cbSize);
 }
Beispiel #2
0
 protected override void HashCore(byte[] rgb, int start, int size)
 {
     State = 1;
     sha.HashCore(rgb, start, size);
 }
Beispiel #3
0
 public static byte[] ComputeHash(byte[] bytes)
 {
     var sha = new SHA1Internal();
     sha.HashCore(bytes, 0, bytes.Length);
     return sha.HashFinal();
 }
Beispiel #4
0
        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);
 }