Use the AES key loaded into the SymmetricCrypto object (via a call to setKey()) and use it with the AES wrap algorithm to wrap a crypto key provided in the pInData parameter.
The wrapped result of this function is 8 bytes longer than the bytes in pInData.
- Parameters
-
| pIV | [ in ] Has to be 8 bytes long for the AES wrap algorithm |
| ivSize | [ in ] Size in bytes of the IV provided in pIV |
| pInData | [ in ] The bytes of a key to be wrapped by the AES key contained in the SymmetricCrypto object |
| inSize | [ in ] Size in bytes of the data in pInData (must be a multiple of 8) |
| pOutData | [ out ] Contains the wrapped data |
| pOutSize | [ in ] Size in bytes of the pOutData array (must be at least 8 bytes longer than inSize) [ out ] Specifies the number of wrapped bytes written into pOutData. |
- Returns
| Success | P6R::eOk | |
| Failure | P6R::eNotInitialized | A successful call to initialize was not made before this call. |
| P6R::eInvalidArg | One of the parameters is NULL. |
| P6R::eInvalidState | Loaded key is not an AES key. |
| P6R::eRange | TData in pInData parameter is not a multiple of 8. |
| P6R::eTooSmall | The pOutData buffer is too small to hold the wrapped result data. |