def wrapKey(self, wrappingKey, key, mecha=MechanismRSAPKCS1):
wrapped = ckbytelist()<EOL>native = mecha.to_native()<EOL>rv = self.lib.C_WrapKey(self.session, native, wrappingKey, key,<EOL>wrapped)<EOL>if rv != CKR_OK:<EOL><INDENT>raise PyKCS11Error(rv)<EOL><DEDENT>rv = self.lib.C_WrapKey(self.session, native, wrappingKey, key,<EOL>wrapped)<EOL>if rv != CKR_OK:<EOL><INDENT>raise PyKCS11Error(rv)<EOL><DEDENT>return wrapped<EOL>
C_WrapKey

:param wrappingKey: a wrapping key handle
:type wrappingKey: integer
:param key: a handle of the key to be wrapped
:type key: integer
:param mecha: the encrypt mechanism to be used
  (use `MechanismRSAPKCS1` for `CKM_RSA_PKCS`)
:type mecha: :class:`Mechanism`
:return: the wrapped key bytes
:rtype: list of bytes

:note: the returned value is an instance of :class:`ckbytelist`.
  You can easily convert it to a binary string with:
  ``bytes(ckbytelistData)``
  or, for Python 2:
  ``''.join(chr(i) for i in ckbytelistData)``