From 107c9f195b9a480c58c657efac05947de9043d5f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 15 Feb 2022 13:48:52 +0100 Subject: Add libar2simplified_recommendation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libar2simplified.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libar2simplified.h') diff --git a/libar2simplified.h b/libar2simplified.h index cd784d4..e1233e2 100644 --- a/libar2simplified.h +++ b/libar2simplified.h @@ -4,6 +4,24 @@ #include +/** + * Get a recommended set of hashing parameter + * + * These shall not be taken too seriously, they are + * just for getting you up and running. You should + * tweak the them to your requirements. + * + * @param side_channel_free Whether the environment is considered safe + * enought against side-channel attacks, use 0 if + * you don't know (it is very unlikely that it is) + * @return Hashing parameters than can be used for + * `libar2simplified_crypt` or `libar2simplified_decode` + */ +#if defined(__GNUC__) +__attribute__((const)) +#endif +const char *libar2simplified_recommendation(int side_channel_free); + /* These are useful when the database stores parameters and * hash separately, when the application uses a pepper, or * when composing multiple hash functions: */ -- cgit v1.2.3-70-g09d2