Wraps a key
Namespace:
Cryptware.NCryptokiAssembly: 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 textImplements
ISession..::..WrapKey(Mechanism, Key, Key)
Remarks
Call C_WrapKey
Exceptions
Exception | Condition |
---|---|
Cryptware.NCryptoki..::..CryptokiException | if a PKCS#11 error occurs |