X-Git-Url: http://git.tuebingen.mpg.de/?p=osl.git;a=blobdiff_plain;f=sha1.c;h=e10cccab2f2f9e8ffad2bad8ff62677c7e01df39;hp=304d7cd661f47f7ac6ffb391c0ede184ac4275bf;hb=758c28419b5b0876bee510f1fb4e01b75b2918f5;hpb=f0884471639e04bda513bb5a9055d5c00d8c4533 diff --git a/sha1.c b/sha1.c index 304d7cd..e10ccca 100644 --- a/sha1.c +++ b/sha1.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2009 Andre Noll + * Copyright (C) 2007-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -235,7 +235,7 @@ static void blk_SHA1_Block(blk_SHA_CTX *ctx, const unsigned int *data) ctx->H[4] += E; } -void blk_SHA1_Init(blk_SHA_CTX *ctx) +static void blk_SHA1_Init(blk_SHA_CTX *ctx) { ctx->size = 0; @@ -247,15 +247,15 @@ void blk_SHA1_Init(blk_SHA_CTX *ctx) ctx->H[4] = 0xc3d2e1f0; } -void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len) +static void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len) { - int lenW = ctx->size & 63; + unsigned lenW = ctx->size & 63; ctx->size += len; /* Read the data into W and process blocks as they get full */ if (lenW) { - int left = 64 - lenW; + unsigned left = 64 - lenW; if (len < left) left = len; memcpy(lenW + (char *)ctx->W, data, left); @@ -275,7 +275,7 @@ void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *data, unsigned long len) memcpy(ctx->W, data, len); } -void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx) +static void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx) { static const unsigned char pad[64] = { 0x80 }; unsigned int padlen[2];