コード例 #1
0
 public SHA1CryptoServiceProvider()
 {
     sha = new SHA1Internal();
 }
コード例 #2
0
ファイル: SHA1Managed.cs プロジェクト: jack-pappas/mono
		public SHA1Managed () 
		{
			sha = new SHA1Internal ();
		}
コード例 #3
0
ファイル: SHA1Internal.cs プロジェクト: jvlppm/Jv.Social
 public SHA1CryptoServiceProvider()
 {
     sha = new SHA1Internal();
 }
コード例 #4
0
 /// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.SHA1Managed" /> class.</summary>
 /// <exception cref="T:System.InvalidOperationException">This class is not compliant with the FIPS algorithm.</exception>
 public SHA1Managed()
 {
     this.sha = new SHA1Internal();
 }
コード例 #5
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();
        }
コード例 #6
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();
 }
コード例 #7
0
        public byte[] GetRunningHash()
        {
            var copy = new SHA1Internal(this);

            return(copy.HashFinal());
        }