summaryrefslogtreecommitdiff
path: root/include/crypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/crypt.h')
-rw-r--r--include/crypt.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/crypt.h b/include/crypt.h
new file mode 100644
index 00000000000..3301f3b7697
--- /dev/null
+++ b/include/crypt.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* Copyright (C) 2020 Steffen Jaeckel <jaeckel-floss@eyet-services.de> */
+
+/**
+ * Compare should with the processed passphrase.
+ *
+ * @should The crypt-style string to compare against
+ * @passphrase The plaintext passphrase
+ * @equal Pointer to an int where the result is stored
+ * '0' = unequal
+ * '1' = equal
+ * Return: 0 on success, error code of errno else
+ */
+int crypt_compare(const char *should, const char *passphrase, int *equal);