HashFinal() 공개 메소드

public HashFinal ( ) : byte[]
리턴 byte[]
예제 #1
0
        public static byte[] ComputeHash(byte[] bytes)
        {
            var sha = new SHA1Internal();

            sha.HashCore(bytes, 0, bytes.Length);
            return(sha.HashFinal());
        }
예제 #2
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());
        }
예제 #3
0
 protected override byte[] HashFinal()
 {
     State = 0;
     return(sha.HashFinal());
 }
예제 #4
0
파일: Sha1.cs 프로젝트: yufeih/Nine.Common
        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();
        }
예제 #5
0
파일: Sha1.cs 프로젝트: yufeih/Nine.Common
 public static byte[] ComputeHash(byte[] bytes)
 {
     var sha = new SHA1Internal();
     sha.HashCore(bytes, 0, bytes.Length);
     return sha.HashFinal();
 }
예제 #6
0
        public byte[] GetRunningHash()
        {
            var copy = new SHA1Internal(this);

            return(copy.HashFinal());
        }