aboutsummaryrefslogtreecommitdiffstats
path: root/libar2simplified.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-15 13:48:52 +0100
committerMattias Andrée <maandree@kth.se>2022-02-15 13:48:52 +0100
commit107c9f195b9a480c58c657efac05947de9043d5f (patch)
tree168e13b29a5cd87bc0b80e2118be0953c6148e34 /libar2simplified.h
parentAdd test for salt generation (diff)
downloadlibar2simplified-107c9f195b9a480c58c657efac05947de9043d5f.tar.gz
libar2simplified-107c9f195b9a480c58c657efac05947de9043d5f.tar.bz2
libar2simplified-107c9f195b9a480c58c657efac05947de9043d5f.tar.xz
Add libar2simplified_recommendation1.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libar2simplified.h')
-rw-r--r--libar2simplified.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libar2simplified.h b/libar2simplified.h
index cd784d4..e1233e2 100644
--- a/libar2simplified.h
+++ b/libar2simplified.h
@@ -4,6 +4,24 @@
#include <libar2.h>
+/**
+ * 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: */