Wraps a key

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

Syntax

Visual Basic (Declaration)
Public Function WrapKey ( _
	mech As Mechanism, _
	wrappingKey As Key, _
	keyToWrap As Key _
) As Byte()
C#
public byte[] WrapKey(
	Mechanism mech,
	Key wrappingKey,
	Key keyToWrap
)
Visual C++
public:
virtual array<unsigned char>^ WrapKey(
	Mechanism^ mech, 
	Key^ wrappingKey, 
	Key^ keyToWrap
) sealed
JavaScript
function wrapKey(mech, wrappingKey, keyToWrap);

Parameters

mech
Type: Cryptware.NCryptoki..::..Mechanism
Mechanism for wrapping
wrappingKey
Type: Cryptware.NCryptoki..::..Key
Key used for wrapping
keyToWrap
Type: Cryptware.NCryptoki..::..Key
Key to wrap

Return Value

cipher text

Implements

ISession..::..WrapKey(Mechanism, Key, Key)

Remarks

Call C_WrapKey

Exceptions

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

See Also