about summary refs log tree commit diff
path: root/src/crypt/crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypt/crypt.c')
-rw-r--r--src/crypt/crypt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/crypt/crypt.c b/src/crypt/crypt.c
new file mode 100644
index 00000000..f1e310f6
--- /dev/null
+++ b/src/crypt/crypt.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+#include <crypt.h>
+
+char *__crypt_r(const char *, const char *, struct crypt_data *);
+
+char *crypt(const char *key, const char *salt)
+{
+	/* Note: update this size when we add more hash types */
+	static char buf[128];
+	return __crypt_r(key, salt, (struct crypt_data *)buf);
+}