|
◆ oe_unseal()
oe_result_t oe_unseal |
( |
const uint8_t * |
blob, |
|
|
size_t |
blob_size, |
|
|
const uint8_t * |
additional_data, |
|
|
size_t |
additional_data_size, |
|
|
uint8_t ** |
plaintext, |
|
|
size_t * |
plaintext_size |
|
) |
| |
Unseal a blob sealed by oe_seal() .
- Parameters
-
[in] | blob | The blob to be unsealed. |
[in] | blob_size | Size of blob . |
[in] | additional_data | Optional additional data for verification. This must match additional_data passed to oe_seal() . |
[in] | additional_data_size | Size of additional_data . |
[out] | plaintext | Optional parameter to receive the pointer to the decrypted data on success. Freed by oe_free() . |
[out] | plaintext_size | Optional parameter to receive the size of plaintext on success. This parameter must be NULL if plaintext is NULL . |
- Return values
-
OE_OK | Unsealed blob successfully. |
OE_INVALID_PARAMETER | At least one parameter is invalid. |
OE_OUT_OF_MEMORY | Failed to allocate memory. |
OE_UNSUPPORTED | Error occurred during decryption, due to either tampered blob or missing plug-in. |
|