WrapEnc
Wrap a key, encode its attributes and write it to a buffer.
Synopsis
int WrapEnc (
CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hWrapper,
CK_OBJECT_HANDLE hWrappee,
unsigned char * buf,
unsigned int bufLen,
CK_SIZE * bytesWritten);
| Parameter | Description |
|---|---|
| hSession | Open session handle |
| hWrapper | Handle to wrapping key |
| hWrappee | Wrappee handle to the key to wrap |
| buf | Reference to bytes to hold the result |
| bufLen | Number of bytes referenced by buf |
| bytesWritten | Reference to value to hold the number of bytes written to buf |
On Successful Return
buf — contains the wrapped key and encoded attributes *bytesWritten number of bytes written to buf