summaryrefslogtreecommitdiff
path: root/crypto/sha1.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-11-22 08:56:40 +0300
committerDmitry Kozlov <xeb@mail.ru>2014-11-22 08:56:40 +0300
commit81ca3923a29ea9b67f7291be23b210019546aa5f (patch)
treefcebf0d426665b4f06e01168f27cd8f9ab8c50d8 /crypto/sha1.c
parent830c399cf126f6bf1e8dfa1ad919a3ce8e346c5d (diff)
downloadaccel-ppp-81ca3923a29ea9b67f7291be23b210019546aa5f.tar.gz
accel-ppp-81ca3923a29ea9b67f7291be23b210019546aa5f.zip
remove trailing whitespaces
Diffstat (limited to 'crypto/sha1.c')
-rw-r--r--crypto/sha1.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/sha1.c b/crypto/sha1.c
index 835de18..a1a216e 100644
--- a/crypto/sha1.c
+++ b/crypto/sha1.c
@@ -12,7 +12,7 @@
/**
@file sha1.c
- LTC_SHA1 code by Tom St Denis
+ LTC_SHA1 code by Tom St Denis
*/
@@ -66,7 +66,7 @@ static int sha1_compress(hash_state *md, unsigned char *buf)
/* expand it */
for (i = 16; i < 80; i++) {
- W[i] = ROL(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1);
+ W[i] = ROL(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1);
}
/* compress */
@@ -75,9 +75,9 @@ static int sha1_compress(hash_state *md, unsigned char *buf)
#define FF1(a,b,c,d,e,i) e = (ROLc(a, 5) + F1(b,c,d) + e + W[i] + 0x6ed9eba1UL); b = ROLc(b, 30);
#define FF2(a,b,c,d,e,i) e = (ROLc(a, 5) + F2(b,c,d) + e + W[i] + 0x8f1bbcdcUL); b = ROLc(b, 30);
#define FF3(a,b,c,d,e,i) e = (ROLc(a, 5) + F3(b,c,d) + e + W[i] + 0xca62c1d6UL); b = ROLc(b, 30);
-
+
#ifdef LTC_SMALL_CODE
-
+
for (i = 0; i < 20; ) {
FF0(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t;
}
@@ -105,7 +105,7 @@ static int sha1_compress(hash_state *md, unsigned char *buf)
}
/* round two */
- for (; i < 40; ) {
+ for (; i < 40; ) {
FF1(a,b,c,d,e,i++);
FF1(e,a,b,c,d,i++);
FF1(d,e,a,b,c,i++);
@@ -114,7 +114,7 @@ static int sha1_compress(hash_state *md, unsigned char *buf)
}
/* round three */
- for (; i < 60; ) {
+ for (; i < 60; ) {
FF2(a,b,c,d,e,i++);
FF2(e,a,b,c,d,i++);
FF2(d,e,a,b,c,i++);
@@ -123,7 +123,7 @@ static int sha1_compress(hash_state *md, unsigned char *buf)
}
/* round four */
- for (; i < 80; ) {
+ for (; i < 80; ) {
FF3(a,b,c,d,e,i++);
FF3(e,a,b,c,d,i++);
FF3(d,e,a,b,c,i++);
@@ -241,12 +241,12 @@ int sha1_done(hash_state * md, unsigned char *out)
/**
Self-test the hash
@return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled
-*/
+*/
int sha1_test(void)
{
#ifndef LTC_TEST
return CRYPT_NOP;
- #else
+ #else
static const struct {
char *msg;
unsigned char hash[20];