aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_version_to_string_proper.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libar2_version_to_string_proper.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libar2_version_to_string_proper.c b/libar2_version_to_string_proper.c
new file mode 100644
index 0000000..109b135
--- /dev/null
+++ b/libar2_version_to_string_proper.c
@@ -0,0 +1,18 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+
+
+const char *
+libar2_version_to_string_proper(enum libar2_argon2_version version)
+{
+ if (version == LIBAR2_ARGON2_VERSION_10) {
+ return "1.0";
+
+ } else if (version == LIBAR2_ARGON2_VERSION_13) {
+ return "1.3";
+
+ } else {
+ errno = EINVAL;
+ return NULL;
+ }
+}