JAMS Developer Guide
GenerateKey Method


MVPSI.JAMS Namespace > Credential Class : GenerateKey Method
The type of key to generate. Supported types are DSA and RSA.
The length of the key. The length must be supported by the specified key type. DSA supports 512 and 1024 bit keys, RSA supports 512, 1024, 2048 and 4096 bit keys.
Generates a new public/private key pair for this Credential.
Syntax
'Declaration
 
Public Sub GenerateKey( _
   ByVal keyType As KeyAlgorithm, _
   ByVal keyLength As System.Integer _
) 
'Usage
 
Dim instance As Credential
Dim keyType As KeyAlgorithm
Dim keyLength As System.Integer
 
instance.GenerateKey(keyType, keyLength)
public void GenerateKey( 
   KeyAlgorithm keyType,
   System.int keyLength
)

Parameters

keyType
The type of key to generate. Supported types are DSA and RSA.
keyLength
The length of the key. The length must be supported by the specified key type. DSA supports 512 and 1024 bit keys, RSA supports 512, 1024, 2048 and 4096 bit keys.
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

Reference

Credential Class
Credential Members