Generate a key pair

Namespace:  Cryptware.NCryptoki
Assembly:  NCryptoki (in NCryptoki.dll)

Syntax

Visual Basic (Declaration)
Public Function GenerateKeyPair ( _
	mech As Mechanism, _
	attListPub As CryptokiCollection, _
	attListPri As CryptokiCollection _
) As Key()
C#
public Key[] GenerateKeyPair(
	Mechanism mech,
	CryptokiCollection attListPub,
	CryptokiCollection attListPri
)
Visual C++
public:
virtual array<Key^>^ GenerateKeyPair(
	Mechanism^ mech, 
	CryptokiCollection^ attListPub, 
	CryptokiCollection^ attListPri
) sealed
JavaScript
function generateKeyPair(mech, attListPub, attListPri);

Parameters

mech
Type: Cryptware.NCryptoki..::..Mechanism
Mechanism for generating the key
attListPub
Type: Cryptware.NCryptoki..::..CryptokiCollection
List of attribute for the public key
attListPri
Type: Cryptware.NCryptoki..::..CryptokiCollection
List of attribute for the private key

Return Value

Generated Keys. public key at position 0, private key at position 1

Implements

ISession..::..GenerateKeyPair(Mechanism, CryptokiCollection, CryptokiCollection)

Remarks

Call C_GenerateKeyPair

Exceptions

ExceptionCondition
Cryptware.NCryptoki..::..CryptokiExceptionif a PKCS#11 error occurs

See Also