Use the AES key loaded into the SymmetricCrypto object (via a call to setKey()) and use it with the AES unwrap algorithm to unwrap an encrypted crypto key provided in the pInData parameter.
- 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 an encrypted key to be unwrapped 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 original unwrapped key |
| pOutSize | [ in ] Size in bytes of the pOutData array [ out ] Specifies the number of 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 | Data in pInData parameter is not a multiple of 8. |
| P6R::eTooSmall | The pOutData buffer is too small to hold the wrapped result data. |
| P6R::eFail | The unwrap operation failed.F |