예제 #1
0
 static TorrentController()
 {
     // The OpenSSL binding incorrectly maps 'size_t' to a C# long
     return;
     try {
         using (OpenSSLSha1 native = new OpenSSLSha1 ()) {
             native.ComputeHash (new byte[1024]);
             HashAlgoFactory.Register (typeof (SHA1), typeof (SHA1CryptoServiceProvider));
             logger.Debug ("Using OpenSSL for SHA1 hashing");
         }
     } catch {
         // If an exception occurs it means that the native SHA1 function is unusable
         // so don't register it then
     }
 }
예제 #2
0
        static TorrentController()
        {
            // The OpenSSL binding incorrectly maps 'size_t' to a C# long
            return;

            try {
                using (OpenSSLSha1 native = new OpenSSLSha1()) {
                    native.ComputeHash(new byte[1024]);
                    HashAlgoFactory.Register(typeof(SHA1), typeof(SHA1CryptoServiceProvider));
                    logger.Debug("Using OpenSSL for SHA1 hashing");
                }
            } catch {
                // If an exception occurs it means that the native SHA1 function is unusable
                // so don't register it then
            }
        }