diff --git a/xzre.h b/xzre.h index f0c728d..324da00 100644 --- a/xzre.h +++ b/xzre.h @@ -1083,6 +1083,15 @@ extern BOOL chacha_decrypt( u8 *out, imported_funcs_t *funcs ); +/** + * @brief obtains a decrypted copy of the secret data + * + * @param output output buffer that will receive the decrypted data + * @param ctx the global context (for secret data and function imports) + * @return BOOL TRUE if successful, FALSE otherwise + */ +extern BOOL secret_data_get_decrypted(u8 *output, global_context_t *ctx); + extern global_context_t *global_ctx; #include "util.h" diff --git a/xzre.lds b/xzre.lds index 2a866c5..97e1bb5 100644 --- a/xzre.lds +++ b/xzre.lds @@ -98,6 +98,9 @@ SECTIONS { "chacha_decrypt" = "."; *(.text.lzma_delta_encoder_inia); + + "secret_data_get_decrypted" = "."; + *(.text.parse_lzma10); } } INSERT AFTER .text;