X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsha1.c;h=b8701b4306e03621de80102d362818f2fce3b887;hp=b56a7c9a6efb80decccd448a57838f3960377efb;hb=b38527fb14af5ebe3d2559e2f861575c722a1ce9;hpb=2ddcabd59d372be3f66c42ed9df15ca7a474ac2a;ds=sidebyside diff --git a/pppd/sha1.c b/pppd/sha1.c index b56a7c9..b8701b4 100644 --- a/pppd/sha1.c +++ b/pppd/sha1.c @@ -20,6 +20,9 @@ #include /* htonl() */ #include "sha1.h" +static void +SHA1_Transform(unsigned long[5], const unsigned char[64]); + #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* blk0() and blk() perform the initial expand. */ @@ -38,7 +41,8 @@ /* Hash a single 512-bit block. This is the core of the algorithm. */ -void SHA1_Transform(unsigned long state[5], const unsigned char buffer[64]) +static void +SHA1_Transform(unsigned long state[5], const unsigned char buffer[64]) { unsigned long a, b, c, d, e; typedef union { @@ -94,7 +98,8 @@ void SHA1_Transform(unsigned long state[5], const unsigned char buffer[64]) /* SHA1Init - Initialize new context */ -void SHA1_Init(SHA1_CTX *context) +void +SHA1_Init(SHA1_CTX *context) { /* SHA1 initialization constants */ context->state[0] = 0x67452301; @@ -108,7 +113,8 @@ void SHA1_Init(SHA1_CTX *context) /* Run your data through this. */ -void SHA1_Update(SHA1_CTX *context, const unsigned char *data, unsigned int len) +void +SHA1_Update(SHA1_CTX *context, const unsigned char *data, unsigned int len) { unsigned int i, j; @@ -132,7 +138,8 @@ void SHA1_Update(SHA1_CTX *context, const unsigned char *data, unsigned int len) /* Add padding and return the message digest. */ -void SHA1_Final(unsigned char digest[20], SHA1_CTX *context) +void +SHA1_Final(unsigned char digest[20], SHA1_CTX *context) { unsigned long i, j; unsigned char finalcount[8];