aboutsummaryrefslogtreecommitdiff
path: root/random/unix/sha2.h
diff options
context:
space:
mode:
Diffstat (limited to 'random/unix/sha2.h')
-rw-r--r--random/unix/sha2.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/random/unix/sha2.h b/random/unix/sha2.h
index cba4f993d..4a5dc30bf 100644
--- a/random/unix/sha2.h
+++ b/random/unix/sha2.h
@@ -52,8 +52,8 @@
* <http://www.apache.org/>.
*/
/*
- * FILE: sha2.h
- * AUTHOR: Aaron D. Gifford <me@aarongifford.com>
+ * FILE: sha2.h
+ * AUTHOR: Aaron D. Gifford <me@aarongifford.com>
*
* A licence was granted to the ASF by Aaron on 4 November 2003.
*/
@@ -68,27 +68,27 @@ extern "C" {
#include "apr.h"
/*** SHA-256/384/512 Various Length Definitions ***********************/
-#define SHA256_BLOCK_LENGTH 64
-#define SHA256_DIGEST_LENGTH 32
-#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1)
-#define SHA384_BLOCK_LENGTH 128
-#define SHA384_DIGEST_LENGTH 48
-#define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1)
-#define SHA512_BLOCK_LENGTH 128
-#define SHA512_DIGEST_LENGTH 64
-#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
+#define SHA256_BLOCK_LENGTH 64
+#define SHA256_DIGEST_LENGTH 32
+#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1)
+#define SHA384_BLOCK_LENGTH 128
+#define SHA384_DIGEST_LENGTH 48
+#define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1)
+#define SHA512_BLOCK_LENGTH 128
+#define SHA512_DIGEST_LENGTH 64
+#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
/*** SHA-256/384/512 Context Structures *******************************/
typedef struct _SHA256_CTX {
- apr_uint32_t state[8];
- apr_uint64_t bitcount;
- apr_byte_t buffer[SHA256_BLOCK_LENGTH];
+ apr_uint32_t state[8];
+ apr_uint64_t bitcount;
+ apr_byte_t buffer[SHA256_BLOCK_LENGTH];
} SHA256_CTX;
typedef struct _SHA512_CTX {
- apr_uint64_t state[8];
- apr_uint64_t bitcount[2];
- apr_byte_t buffer[SHA512_BLOCK_LENGTH];
+ apr_uint64_t state[8];
+ apr_uint64_t bitcount[2];
+ apr_byte_t buffer[SHA512_BLOCK_LENGTH];
} SHA512_CTX;
typedef SHA512_CTX SHA384_CTX;
@@ -100,23 +100,23 @@ void SHA256_Update(SHA256_CTX *, const apr_byte_t *, size_t);
void SHA256_Final(apr_byte_t [SHA256_DIGEST_LENGTH], SHA256_CTX *);
char* SHA256_End(SHA256_CTX *, char [SHA256_DIGEST_STRING_LENGTH]);
char* SHA256_Data(const apr_byte_t *, size_t,
- char [SHA256_DIGEST_STRING_LENGTH]);
+ char [SHA256_DIGEST_STRING_LENGTH]);
void SHA384_Init(SHA384_CTX *);
void SHA384_Update(SHA384_CTX *, const apr_byte_t *, size_t);
void SHA384_Final(apr_byte_t [SHA384_DIGEST_LENGTH], SHA384_CTX *);
char* SHA384_End(SHA384_CTX *, char [SHA384_DIGEST_STRING_LENGTH]);
char* SHA384_Data(const apr_byte_t *, size_t,
- char [SHA384_DIGEST_STRING_LENGTH]);
+ char [SHA384_DIGEST_STRING_LENGTH]);
void SHA512_Init(SHA512_CTX *);
void SHA512_Update(SHA512_CTX *, const apr_byte_t *, size_t);
void SHA512_Final(apr_byte_t [SHA512_DIGEST_LENGTH], SHA512_CTX *);
char* SHA512_End(SHA512_CTX *, char [SHA512_DIGEST_STRING_LENGTH]);
char* SHA512_Data(const apr_byte_t *, size_t,
- char [SHA512_DIGEST_STRING_LENGTH]);
+ char [SHA512_DIGEST_STRING_LENGTH]);
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif /* __cplusplus */