// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// not free :-(
// http://webstore.ansi.org/ansidocstore/product.asp?sku=ANSI+X9%2E52%2D1998
-#if NET_2_0
[ComVisible (true)]
-#endif
public abstract class TripleDES : SymmetricAlgorithm {
- public TripleDES ()
+ protected TripleDES ()
{
// from SymmetricAlgorithm
KeySizeValue = 192;
// if ( b == c ) then TripleDES == DES(a) (hence weak key)
public static bool IsWeakKey (byte[] rgbKey)
{
-#if NET_2_0
if (rgbKey == null)
throw new CryptographicException (Locale.GetText ("Null Key"));
-#endif
// 128 bits (16 bytes) is 3 DES with 2 keys
if (rgbKey.Length == 16) {
// weak if first half == second half
public static new TripleDES Create ()
{
+#if FULL_AOT_RUNTIME
+ return new System.Security.Cryptography.TripleDESCryptoServiceProvider ();
+#else
return Create ("System.Security.Cryptography.TripleDES");
+#endif
}
public static new TripleDES Create (string str)
}
}
+