diff options
author | Mattias Andrée <maandree@kth.se> | 2022-01-16 19:58:57 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-01-16 19:58:57 +0100 |
commit | 8bdc2e4929068210d523c34c0b171b51ce96057f (patch) | |
tree | c77331e77b9777a37716bffb7365c4486a6df9a0 /libar2_version_to_string.c | |
download | libar2-f5e5a32bcd42f4ae9d351d8078df5e5ab971a5bc.tar.gz libar2-f5e5a32bcd42f4ae9d351d8078df5e5ab971a5bc.tar.bz2 libar2-f5e5a32bcd42f4ae9d351d8078df5e5ab971a5bc.tar.xz |
First commit1.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libar2_version_to_string.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libar2_version_to_string.c b/libar2_version_to_string.c new file mode 100644 index 0000000..8783a4a --- /dev/null +++ b/libar2_version_to_string.c @@ -0,0 +1,18 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + + +const char * +libar2_version_to_string(enum libar2_argon2_version version) +{ + if (version == LIBAR2_ARGON2_VERSION_10) { + return "10"; + + } else if (version == LIBAR2_ARGON2_VERSION_13) { + return "13"; + + } else { + errno = EINVAL; + return NULL; + } +} |