index.rst (1662B)
1 .. _mozilla_projects_nss_reference_fc_wrapkey: 2 3 FC_WrapKey 4 ========== 5 6 `Name <#name>`__ 7 ~~~~~~~~~~~~~~~~ 8 9 .. container:: 10 11 FC_WrapKey - wrap a key 12 13 `Syntax <#syntax>`__ 14 ~~~~~~~~~~~~~~~~~~~~ 15 16 .. container:: 17 18 .. code:: 19 20 CK_RV FC_WrapKey( 21 CK_SESSION_HANDLE hSession, 22 CK_MECHANISM_PTR pMechanism, 23 CK_OBJECT_HANDLE hWrappingKey, 24 CK_OBJECT_HANDLE hKey, 25 CK_BYTE_PTR pWrappedKey, 26 CK_ULONG_PTR pusWrappedKeyLen 27 ); 28 29 `Parameters <#parameters>`__ 30 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 31 32 .. container:: 33 34 ``hSession`` 35 [in] session handle. 36 ``pMechanism`` 37 [in] pointer to the mechanism to use. 38 ``hWrappingKey`` 39 [in] pointer to the public key template. 40 ``hKey`` 41 [in] number of attributes in the public key template. 42 ``pWrappedKey`` 43 [out] pointer to the location to receive the wrapped key or NULL. 44 ``pusWrappedKeyLen`` 45 [in, out] pointer to length of wrapped key buffer. 46 47 `Description <#description>`__ 48 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49 50 .. container:: 51 52 ``FC_WrapKey`` wraps (encrypts) a key. If ``pWrappedKey`` is NULL the length of the wrapped key 53 is returned in ``pusWrappedKeyLen`` and FC_WrapKey may be called again with ``pWrappedKey`` set 54 to retrieve the wrapped key. 55 56 A user must log into the token (to assume the NSS User role) before calling ``FC_WrapKey``. 57 58 .. _return_value: 59 60 `Return value <#return_value>`__ 61 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 63 .. container:: 64 65 `Examples <#examples>`__ 66 ~~~~~~~~~~~~~~~~~~~~~~~~ 67 68 .. container:: 69 70 .. _see_also: 71 72 `See also <#see_also>`__ 73 ~~~~~~~~~~~~~~~~~~~~~~~~ 74 75 .. container:: 76 77 - `NSC_WrapKey </en-US/NSC_WrapKey>`__