summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/des/sha.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/des/sha.h')
-rw-r--r--source4/heimdal/lib/des/sha.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/source4/heimdal/lib/des/sha.h b/source4/heimdal/lib/des/sha.h
index 4657fad51f..6021823f5c 100644
--- a/source4/heimdal/lib/des/sha.h
+++ b/source4/heimdal/lib/des/sha.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-/* $Id: sha.h,v 1.9 2006/01/08 21:47:29 lha Exp $ */
+/* $Id: sha.h,v 1.10 2006/04/15 07:54:11 lha Exp $ */
#ifndef HEIM_SHA_H
#define HEIM_SHA_H 1
@@ -40,9 +40,12 @@
#define SHA1_Init hc_SHA1_Init
#define SHA1_Update hc_SHA1_Update
#define SHA1_Final hc_SHA1_Final
+#define SHA256_Init hc_SHA256_Init
+#define SHA256_Update hc_SHA256_Update
+#define SHA256_Final hc_SHA256_Final
/*
- *
+ * SHA-1
*/
#define SHA_DIGEST_LENGTH 20
@@ -59,4 +62,22 @@ void SHA1_Init (struct sha *m);
void SHA1_Update (struct sha *m, const void *v, size_t len);
void SHA1_Final (void *res, struct sha *m);
+/*
+ * SHA-2 256
+ */
+
+#define SHA256_DIGEST_LENGTH 32
+
+struct hc_sha256state {
+ unsigned int sz[2];
+ u_int32_t counter[8];
+ unsigned char save[64];
+};
+
+typedef struct hc_sha256state SHA256_CTX;
+
+void SHA256_Init (SHA256_CTX *);
+void SHA256_Update (SHA256_CTX *, const void *, size_t);
+void SHA256_Final (void *, SHA256_CTX *);
+
#endif /* HEIM_SHA_H */