summaryrefslogtreecommitdiff
path: root/sys/crypto
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-06-04 16:37:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-06-04 16:37:03 +0000
commita6d055cd651cc8e88c3a3eeeb169f8e345735bfb (patch)
treebb26b8a62420f5bc7a10f84b313b4ff89eb33681 /sys/crypto
parente28576c7524afaa68eba32288a8ac28c7c706443 (diff)
better indent for easier searching
Diffstat (limited to 'sys/crypto')
-rw-r--r--sys/crypto/sha1.c15
-rw-r--r--sys/crypto/sha1.h8
2 files changed, 12 insertions, 11 deletions
diff --git a/sys/crypto/sha1.c b/sys/crypto/sha1.c
index b179d969569..69fd63088b9 100644
--- a/sys/crypto/sha1.c
+++ b/sys/crypto/sha1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sha1.c,v 1.1 2000/02/28 23:13:05 deraadt Exp $ */
+/* $OpenBSD: sha1.c,v 1.2 2000/06/04 16:37:02 deraadt Exp $ */
/*
* SHA-1 in C
@@ -56,11 +56,12 @@ typedef union {
} CHAR64LONG16;
CHAR64LONG16* block;
#ifdef SHA1HANDSOFF
-static unsigned char workspace[64];
- block = (CHAR64LONG16*)workspace;
+ static unsigned char workspace[64];
+
+ block = (CHAR64LONG16 *)workspace;
bcopy(buffer, block, 64);
#else
- block = (CHAR64LONG16*)buffer;
+ block = (CHAR64LONG16 *)buffer;
#endif
/* Copy context->state[] to working vars */
a = state[0];
@@ -102,7 +103,7 @@ static unsigned char workspace[64];
/* SHA1Init - Initialize new context */
-void SHA1Init(SHA1_CTX* context)
+void SHA1Init(SHA1_CTX *context)
{
/* SHA1 initialization constants */
context->state[0] = 0x67452301;
@@ -116,7 +117,7 @@ void SHA1Init(SHA1_CTX* context)
/* Run your data through this. */
-void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len)
+void SHA1Update(SHA1_CTX *context, unsigned char *data, unsigned int len)
{
unsigned int i;
unsigned int j;
@@ -139,7 +140,7 @@ unsigned int j;
/* Add padding and return the message digest. */
-void SHA1Final(unsigned char digest[20], SHA1_CTX* context)
+void SHA1Final(unsigned char digest[20], SHA1_CTX *context)
{
unsigned int i;
unsigned char finalcount[8];
diff --git a/sys/crypto/sha1.h b/sys/crypto/sha1.h
index 33525f04a0f..268d3107877 100644
--- a/sys/crypto/sha1.h
+++ b/sys/crypto/sha1.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sha1.h,v 1.1 2000/02/28 23:13:05 deraadt Exp $ */
+/* $OpenBSD: sha1.h,v 1.2 2000/06/04 16:37:02 deraadt Exp $ */
/*
* SHA-1 in C
@@ -16,8 +16,8 @@ typedef struct {
} SHA1_CTX;
void SHA1Transform __P((u_int32_t state[5], unsigned char buffer[64]));
-void SHA1Init __P((SHA1_CTX* context));
-void SHA1Update __P((SHA1_CTX* context, unsigned char* data, unsigned int len));
-void SHA1Final __P((unsigned char digest[20], SHA1_CTX* context));
+void SHA1Init __P((SHA1_CTX * context));
+void SHA1Update __P((SHA1_CTX * context, unsigned char * data, unsigned int len));
+void SHA1Final __P((unsigned char digest[20], SHA1_CTX * context));
#endif /* _SHA1_H_ */