aboutsummaryrefslogtreecommitdiffstats
path: root/com32/libutil/include
diff options
context:
space:
mode:
authorhpa <hpa>2005-01-21 00:49:46 +0000
committerhpa <hpa>2005-01-21 00:49:46 +0000
commite8d5cb2b20b82c4e30942834fad8ddb1592bb1db (patch)
treed968800a7b80406059ba06508b84ed62ddfd89db /com32/libutil/include
parentf7c564216b2d987a1b0b30602fd33536c7f4276e (diff)
downloadsyslinux-e8d5cb2b20b82c4e30942834fad8ddb1592bb1db.tar.gz
syslinux-e8d5cb2b20b82c4e30942834fad8ddb1592bb1db.tar.xz
syslinux-e8d5cb2b20b82c4e30942834fad8ddb1592bb1db.zip
More work on password support for the menu systems. Make the base64
decoder work (necessary to handle encrypted passwords.) Simple SHA-1 password generator in Perl.
Diffstat (limited to 'com32/libutil/include')
-rw-r--r--com32/libutil/include/base64.h42
-rw-r--r--com32/libutil/include/sha1.h6
2 files changed, 46 insertions, 2 deletions
diff --git a/com32/libutil/include/base64.h b/com32/libutil/include/base64.h
new file mode 100644
index 00000000..45c69afc
--- /dev/null
+++ b/com32/libutil/include/base64.h
@@ -0,0 +1,42 @@
+#ident "$Id$"
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2005 H. Peter Anvin - All Rights Reserved
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall
+ * be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * ----------------------------------------------------------------------- */
+
+/*
+ * base64.h
+ *
+ * Simple routines for handing base64 text
+ */
+
+#ifndef LIBUTIL_BASE64_H
+#define LIBUTIL_BASE64_H
+
+#include <stddef.h>
+
+size_t unbase64(unsigned char *, size_t, const char *);
+
+#endif
diff --git a/com32/libutil/include/sha1.h b/com32/libutil/include/sha1.h
index 7f08ced3..ea324c72 100644
--- a/com32/libutil/include/sha1.h
+++ b/com32/libutil/include/sha1.h
@@ -1,15 +1,17 @@
#ifndef LIBUTIL_SHA1_H
#define LIBUTIL_SHA1_H
+#include <stdint.h>
+
typedef struct {
uint32_t state[5];
uint32_t count[2];
unsigned char buffer[64];
} SHA1_CTX;
-void SHA1Transform(uint32_t state[5], unsigned char buffer[64]);
+void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
void SHA1Init(SHA1_CTX* context);
-void SHA1Update(SHA1_CTX* context, unsigned char* data, uint32_t len); /*
+void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len); /*
JHB */
void SHA1Final(unsigned char digest[20], SHA1_CTX* context);