aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-03-08 19:17:22 +0100
committerDuncaen <mail@duncano.de>2017-03-08 19:22:29 +0100
commit7e765cdd84cb177ed08550be48ae94ef235c335b (patch)
tree552263baa588ebf4a14af5233b2b7f79e4402d71
parentf528adf1001d83a72368e185a28c1ea51e07073d (diff)
downloadlobase-7e765cdd84cb177ed08550be48ae94ef235c335b.tar.gz
lib/libopenbsd: move hash headers to include/
-rw-r--r--include/md5.h (renamed from lib/libopenbsd/md5.h)0
-rw-r--r--include/rmd160.h (renamed from lib/libopenbsd/rmd160.h)0
-rw-r--r--include/sha1.h (renamed from lib/libopenbsd/sha1.h)0
-rw-r--r--include/sha2.h (renamed from lib/libopenbsd/sha2.h)22
4 files changed, 21 insertions, 1 deletions
diff --git a/lib/libopenbsd/md5.h b/include/md5.h
index d69b1a5..d69b1a5 100644
--- a/lib/libopenbsd/md5.h
+++ b/include/md5.h
diff --git a/lib/libopenbsd/rmd160.h b/include/rmd160.h
index 5137c59..5137c59 100644
--- a/lib/libopenbsd/rmd160.h
+++ b/include/rmd160.h
diff --git a/lib/libopenbsd/sha1.h b/include/sha1.h
index f596be6..f596be6 100644
--- a/lib/libopenbsd/sha1.h
+++ b/include/sha1.h
diff --git a/lib/libopenbsd/sha2.h b/include/sha2.h
index 065c30d..52ddb3f 100644
--- a/lib/libopenbsd/sha2.h
+++ b/include/sha2.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sha2.h,v 1.9 2013/04/15 15:54:17 millert Exp $ */
+/* $OpenBSD: sha2.h,v 1.10 2016/09/03 17:00:29 tedu Exp $ */
/*
* FILE: sha2.h
@@ -51,6 +51,9 @@
#define SHA512_BLOCK_LENGTH 128
#define SHA512_DIGEST_LENGTH 64
#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
+#define SHA512_256_BLOCK_LENGTH 128
+#define SHA512_256_DIGEST_LENGTH 32
+#define SHA512_256_DIGEST_STRING_LENGTH (SHA512_256_DIGEST_LENGTH * 2 + 1)
/*** SHA-224/256/384/512 Context Structure *******************************/
@@ -131,6 +134,23 @@ char *SHA512FileChunk(const char *, char *, off_t, off_t)
char *SHA512Data(const u_int8_t *, size_t, char *)
__attribute__((__bounded__(__string__,1,2)))
__attribute__((__bounded__(__minbytes__,3,SHA512_DIGEST_STRING_LENGTH)));
+
+void SHA512_256Init(SHA2_CTX *);
+void SHA512_256Transform(u_int64_t state[8], const u_int8_t [SHA512_256_BLOCK_LENGTH]);
+void SHA512_256Update(SHA2_CTX *, const u_int8_t *, size_t)
+ __attribute__((__bounded__(__string__,2,3)));
+void SHA512_256Pad(SHA2_CTX *);
+void SHA512_256Final(u_int8_t [SHA512_256_DIGEST_LENGTH], SHA2_CTX *)
+ __attribute__((__bounded__(__minbytes__,1,SHA512_256_DIGEST_LENGTH)));
+char *SHA512_256End(SHA2_CTX *, char *)
+ __attribute__((__bounded__(__minbytes__,2,SHA512_256_DIGEST_STRING_LENGTH)));
+char *SHA512_256File(const char *, char *)
+ __attribute__((__bounded__(__minbytes__,2,SHA512_256_DIGEST_STRING_LENGTH)));
+char *SHA512_256FileChunk(const char *, char *, off_t, off_t)
+ __attribute__((__bounded__(__minbytes__,2,SHA512_256_DIGEST_STRING_LENGTH)));
+char *SHA512_256Data(const u_int8_t *, size_t, char *)
+ __attribute__((__bounded__(__string__,1,2)))
+ __attribute__((__bounded__(__minbytes__,3,SHA512_256_DIGEST_STRING_LENGTH)));
__END_DECLS
#endif /* _SHA2_H */