summaryrefslogtreecommitdiffstats
path: root/SHA1.c
diff options
context:
space:
mode:
Diffstat (limited to 'SHA1.c')
-rw-r--r--SHA1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/SHA1.c b/SHA1.c
new file mode 100644
index 0000000..29e42ba
--- /dev/null
+++ b/SHA1.c
@@ -0,0 +1,19 @@
+
+/* Simple wrapper for code in sha1.c, to
+ * provide SHA1() interface as provided by opensll.
+ * I do this because I cannot get SHA1 when staticly linking.
+ *
+ * sha1.c sha1.h md5.h all copied from coreutils-5.94
+ */
+
+#include "sha1.h"
+
+unsigned char *SHA1(unsigned char *buf, int len, unsigned char *dest)
+{
+ static unsigned char defdest[20];
+ if (dest == NULL) dest = defdest;
+
+ return (unsigned char *)sha1_buffer((const char*)buf,
+ len,
+ (void*)dest);
+}