summaryrefslogtreecommitdiff
path: root/cipher/sha512.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-12-11 15:46:12 +0000
committerWerner Koch <wk@gnupg.org>2003-12-11 15:46:12 +0000
commitadf881257f924c201555476be103f5920618fc8e (patch)
tree612d1df430018d1b06b58ce75c14e6cfa93bed5f /cipher/sha512.c
parent840e10ca8330f55b53e61bab914ee4157c477021 (diff)
downloadlibgcrypt-adf881257f924c201555476be103f5920618fc8e.tar.gz
Mostly indendation changes. Completed the Manifest.
Diffstat (limited to 'cipher/sha512.c')
-rw-r--r--cipher/sha512.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cipher/sha512.c b/cipher/sha512.c
index cc33b805..e2160ebe 100644
--- a/cipher/sha512.c
+++ b/cipher/sha512.c
@@ -66,7 +66,7 @@ typedef struct
static void
sha512_init (void *context)
{
- SHA512_CONTEXT *hd = (SHA512_CONTEXT *) context;
+ SHA512_CONTEXT *hd = context;
hd->h0 = U64_C(0x6a09e667f3bcc908);
hd->h1 = U64_C(0xbb67ae8584caa73b);
@@ -84,7 +84,7 @@ sha512_init (void *context)
static void
sha384_init (void *context)
{
- SHA512_CONTEXT *hd = (SHA512_CONTEXT *) context;
+ SHA512_CONTEXT *hd = context;
hd->h0 = U64_C(0xcbbb9d5dc1059ed8);
hd->h1 = U64_C(0x629a292a367cd507);
@@ -210,7 +210,8 @@ transform (SHA512_CONTEXT *hd, byte *data)
b = a;
a = t1 + t2;
- /* printf("t=%d a=%016llX b=%016llX c=%016llX d=%016llX e=%016llX f=%016llX g=%016llX h=%016llX\n",t,a,b,c,d,e,f,g,h); */
+ /* printf("t=%d a=%016llX b=%016llX c=%016llX d=%016llX "
+ "e=%016llX f=%016llX g=%016llX h=%016llX\n",t,a,b,c,d,e,f,g,h); */
}
/* update chaining vars */
@@ -231,7 +232,7 @@ transform (SHA512_CONTEXT *hd, byte *data)
static void
sha512_write (void *context, byte *inbuf, size_t inlen)
{
- SHA512_CONTEXT *hd = (SHA512_CONTEXT *) context;
+ SHA512_CONTEXT *hd = context;
if (hd->count == 128)
{ /* flush the buffer */
@@ -276,7 +277,7 @@ sha512_write (void *context, byte *inbuf, size_t inlen)
static void
sha512_final (void *context)
{
- SHA512_CONTEXT *hd = (SHA512_CONTEXT *) context;
+ SHA512_CONTEXT *hd = context;
u64 t, msb, lsb;
byte *p;