Skip to content

Commit

Permalink
add secret_data_get_decrypted
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Apr 6, 2024
1 parent 651b9ed commit fa978c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xzre.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions xzre.lds
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ SECTIONS {

"chacha_decrypt" = ".";
*(.text.lzma_delta_encoder_inia);

"secret_data_get_decrypted" = ".";
*(.text.parse_lzma10);
}
} INSERT AFTER .text;

Expand Down

0 comments on commit fa978c7

Please sign in to comment.