From d831c660e27d7e62f7613cad1caed169ecf1433e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 15 Feb 2022 15:38:11 +0100 Subject: Add libar2simplified_init_context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libar2simplified.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libar2simplified.h') diff --git a/libar2simplified.h b/libar2simplified.h index e1233e2..0d005fb 100644 --- a/libar2simplified.h +++ b/libar2simplified.h @@ -162,4 +162,20 @@ int libar2simplified_hash(void *hash, void *msg, size_t msglen, struct libar2_ar LIBAR2_PUBLIC__ LIBAR2_NONNULL__(1, 2) char *libar2simplified_crypt(char *msg, const char *params, char *rv); +/* Lower-level functions: */ + +/** + * Initialises the context argument for `libar2_hash`, + * with all auto-erase options turned off + * + * This function provides a dynamic memory management + * functions that erase memory before it is deallocated. + * It also also provides a multi-threading support using + * a thread pool. + * + * @param ctxp Output parameter + */ +LIBAR2_PUBLIC__ +void libar2simplified_init_context(struct libar2_context *ctxp); + #endif -- cgit v1.2.3-70-g09d2