summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-10 22:50:32 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-02-10 22:50:32 -0800
commit830cd01e2135a4e6e9ef06d1680fe9cd5a066e74 (patch)
tree7b1b824447704fbdc9effae869005f636f05dcb0
parenta62aaffeead17edc61e509ea643af408743619d5 (diff)
downloadsyslinux-830cd01e2135a4e6e9ef06d1680fe9cd5a066e74.tar.gz
libutil: add header file <xcrypt.h> for extended crypt routines
Add a common header file, xcrypt.h, for the various extended crypt routines (md5, sha256, sha512).
-rw-r--r--com32/libutil/include/xcrypt.h10
-rw-r--r--com32/libutil/sha256crypt.c1
-rw-r--r--com32/libutil/sha512crypt.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/com32/libutil/include/xcrypt.h b/com32/libutil/include/xcrypt.h
new file mode 100644
index 00000000..89bc8bc6
--- /dev/null
+++ b/com32/libutil/include/xcrypt.h
@@ -0,0 +1,10 @@
+#ifndef _LIBUTIL_XCRYPT_H
+#define _LIBUTIL_XCRYPT_H
+
+/* Extended crypt() implementations */
+
+char *crypt_md5(const char *, const char *);
+char *sha256_crypt (const char *, const char *);
+char *sha512_crypt (const char *, const char *);
+
+#endif
diff --git a/com32/libutil/sha256crypt.c b/com32/libutil/sha256crypt.c
index 938e9473..7dbd8faf 100644
--- a/com32/libutil/sha256crypt.c
+++ b/com32/libutil/sha256crypt.c
@@ -13,6 +13,7 @@
#include <sys/param.h>
#include <sys/types.h>
+#include "xcrypt.h"
/* Structure to save state of computation between the single steps. */
struct sha256_ctx
diff --git a/com32/libutil/sha512crypt.c b/com32/libutil/sha512crypt.c
index 0c3a918a..9ff587b8 100644
--- a/com32/libutil/sha512crypt.c
+++ b/com32/libutil/sha512crypt.c
@@ -13,6 +13,7 @@
#include <sys/param.h>
#include <sys/types.h>
+#include "xcrypt.h"
/* Structure to save state of computation between the single steps. */
struct sha512_ctx