CreateSelfSignedCertificate Method
See Also 
SourceCode.Security.Cryptography Namespace > CryptoFactory Class : CreateSelfSignedCertificate Method



name
to
keyBitLength
exportable

Glossary Item Box

Syntax

Visual Basic (Declaration)  
Public Shared Function CreateSelfSignedCertificate( _
   ByVal name As String, _
   ByVal to As Date, _
   ByVal keyBitLength As UShort, _
   ByVal exportable As Boolean _
) As X509Certificate2
Visual Basic (Usage) Copy Code
Dim name As String
Dim to As Date
Dim keyBitLength As UShort
Dim exportable As Boolean
Dim value As X509Certificate2
 
value = CryptoFactory.CreateSelfSignedCertificate(name, to, keyBitLength, exportable)
C#  
public static X509Certificate2 CreateSelfSignedCertificate( 
   string name,
   DateTime to,
   ushort keyBitLength,
   bool exportable
)
C++/CLI  
public:
static X509Certificate2^ CreateSelfSignedCertificate( 
   String^ name,
   DateTime to,
   ushort keyBitLength,
   bool exportable
) 

Parameters

name
to
keyBitLength
exportable

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also