// Constructor.
 public SHA1CryptoServiceProvider()
     : base()
 {
     try
     {
         state = CryptoMethods.HashNew(CryptoMethods.SHA1);
     }
     catch (NotImplementedException)
     {
         // The runtime engine does not have SHA1 support.
         state = IntPtr.Zero;
     }
 }
Exemple #2
0
 // Constructor.
 public RIPEMD160Managed()
     : base()
 {
     try
     {
         state = CryptoMethods.HashNew(CryptoMethods.RIPEMD160);
     }
     catch (NotImplementedException)
     {
         // The runtime engine does not have RIPEMD160 support.
         throw new CryptographicException
                   (_("Crypto_NoProvider"), "RIPEMD160");
     }
 }
Exemple #3
0
 // Constructor.
 public SHA256Managed()
     : base()
 {
     try
     {
         state = CryptoMethods.HashNew(CryptoMethods.SHA256);
     }
     catch (NotImplementedException)
     {
         // The runtime engine does not have SHA256 support.
         throw new CryptographicException
                   (_("Crypto_NoProvider"), "SHA256");
     }
 }