//\r
// System.Security.Cryptography CspParameters.cs\r
//\r
-// Author:\r
-// Thomas Neidhart (tome@sbox.tugraz.at)\r
+// Authors:\r
+// Thomas Neidhart (tome@sbox.tugraz.at)\r
+// Sebastien Pouliot <sebastien@ximian.com>
//\r
-// (C) 2004 Novell (http://www.novell.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 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
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-\r
-using System;\r
+
+#if NET_2_0
+using System.Runtime.InteropServices;
+using System.Security.AccessControl;
+#endif
\r
namespace System.Security.Cryptography {\r
\r
+#if NET_2_0
+ [ComVisible (true)]
+#endif
public sealed class CspParameters {
\r
private CspProviderFlags _Flags;\r
public CspProviderFlags Flags {\r
get { return _Flags; }\r
set { _Flags = value; }\r
- }\r
+ }
+
+#if NET_2_0
+ private SecureString _password;
+ private IntPtr _windowHandle;
+
+ public CspParameters (int dwTypeIn, string strProviderNameIn, string strContainerNameIn,
+ CryptoKeySecurity cryptoKeySecurity, IntPtr parentWindowHandle)
+ : this (dwTypeIn, strProviderNameIn, strContainerNameIn)
+ {
+ if (cryptoKeySecurity != null)
+ CryptoKeySecurity = cryptoKeySecurity;
+ _windowHandle = parentWindowHandle;
+ }
+
+ public CspParameters (int dwTypeIn, string strProviderNameIn, string strContainerNameIn,
+ CryptoKeySecurity cryptoKeySecurity, SecureString keyPassword)
+ : this (dwTypeIn, strProviderNameIn, strContainerNameIn)
+ {
+ if (cryptoKeySecurity != null)
+ CryptoKeySecurity = cryptoKeySecurity;
+ _password = keyPassword;
+ }
+
+ [MonoTODO ("access control isn't implemented")]
+ public CryptoKeySecurity CryptoKeySecurity {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+
+ public SecureString KeyPassword {
+ get { return _password; }
+ set { _password = value; }
+ }
+
+ public IntPtr ParentWindowHandle {
+ get { return _windowHandle; }
+ set { _windowHandle = value; }
+ }
+#endif\r
}\r
}\r