Ejemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (!this._disposed)
     {
         if (disposing)
         {
             if (this._hashAlgorithm != null)
             {
                 this._hashAlgorithm = null;
             }
             if (this._rsaProxy != null)
             {
                 this._rsaProxy.Dispose();
                 this._rsaProxy = null;
             }
         }
         this._disposed = true;
     }
 }
Ejemplo n.º 2
0
 private void Initialize(System.Security.Cryptography.RSACryptoServiceProvider rsa)
 {
     if (Utility.RequiresFipsCompliance)
     {
         System.Security.Cryptography.CryptoConfig.AddOID("2.16.840.1.101.3.4.2.1", new string[]
         {
             "SHA256CSP"
         });
         System.Security.Cryptography.CryptoConfig.AddAlgorithm(typeof(SHA256CryptoServiceProvider), new string[]
         {
             "SHA256CSP"
         });
         this._hashAlgorithm = "SHA256CSP";
     }
     else
     {
         this._hashAlgorithm = "SHA256";
     }
     this._rsaProxy = new RSACryptoServiceProviderProxy(rsa);
 }