aboutsummaryrefslogtreecommitdiffstats
path: root/libar2simplified.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-14 21:28:52 +0100
committerMattias Andrée <maandree@kth.se>2022-02-14 21:28:52 +0100
commitea565f8d945db5dd0a638973fecae37318412bbf (patch)
treeac86bfd810383102010c82736684cc872f8cee2a /libar2simplified.h
parentXOR seed provided to srand with data depending on current seed, in case it is already seed in a better manner (diff)
downloadlibar2simplified-ea565f8d945db5dd0a638973fecae37318412bbf.tar.gz
libar2simplified-ea565f8d945db5dd0a638973fecae37318412bbf.tar.bz2
libar2simplified-ea565f8d945db5dd0a638973fecae37318412bbf.tar.xz
Add libar2simplified_crypt and fix threading
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libar2simplified.h')
-rw-r--r--libar2simplified.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libar2simplified.h b/libar2simplified.h
index 02a27ec..55eb123 100644
--- a/libar2simplified.h
+++ b/libar2simplified.h
@@ -4,6 +4,10 @@
#include <libar2.h>
+/* These are useful when the database stores parameters and
+ * hash separately, when the application uses a pepper, or
+ * when composing multiple hash functions: */
+
LIBAR2_PUBLIC__ LIBAR2_NONNULL__(1)
char *libar2simplified_encode(const struct libar2_argon2_parameters *params, void *hash);
@@ -17,4 +21,9 @@ libar2simplified_decode(const char *str, char **tagp, char **endp, int (*random_
LIBAR2_PUBLIC__ LIBAR2_NONNULL__(1, 4)
int libar2simplified_hash(void *hash, void *msg, size_t msglen, struct libar2_argon2_parameters *params);
+/* This one is useful you just want to do it crypt(3)-style: */
+
+LIBAR2_PUBLIC__ LIBAR2_NONNULL__(1, 2)
+char *libar2simplified_crypt(char *msg, const char *params, char *rv);
+
#endif