diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-13 00:28:37 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-13 00:28:37 +0100 |
commit | 2ef79ab9d01090c1b3a2cc445a18d141cbb3c781 (patch) | |
tree | 1a455cc6d734f4b63adaf7857e4747dd2ed8ffcb /libar2simplified.h | |
download | libar2simplified-2ef79ab9d01090c1b3a2cc445a18d141cbb3c781.tar.gz libar2simplified-2ef79ab9d01090c1b3a2cc445a18d141cbb3c781.tar.bz2 libar2simplified-2ef79ab9d01090c1b3a2cc445a18d141cbb3c781.tar.xz |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libar2simplified.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libar2simplified.h b/libar2simplified.h new file mode 100644 index 0000000..02a27ec --- /dev/null +++ b/libar2simplified.h @@ -0,0 +1,20 @@ +/* See LICENSE file for copyright and license details. */ +#ifndef LIBAR2SIMPLIFIED_H +#define LIBAR2SIMPLIFIED_H + +#include <libar2.h> + +LIBAR2_PUBLIC__ LIBAR2_NONNULL__(1) +char *libar2simplified_encode(const struct libar2_argon2_parameters *params, void *hash); + +LIBAR2_PUBLIC__ LIBAR2_NONNULL__(1, 2) +char *libar2simplified_encode_hash(const struct libar2_argon2_parameters *params, void *hash); + +LIBAR2_PUBLIC__ LIBAR2_NONNULL__(1) +struct libar2_argon2_parameters * +libar2simplified_decode(const char *str, char **tagp, char **endp, int (*random_byte_generator)(char *out, size_t n)); + +LIBAR2_PUBLIC__ LIBAR2_NONNULL__(1, 4) +int libar2simplified_hash(void *hash, void *msg, size_t msglen, struct libar2_argon2_parameters *params); + +#endif |