cipher: Improve readability by using a macro.

* cipher/random.c (mix_pool): Use DIGESTLEN instead of 20.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-08-17 11:03:07 +02:00
parent 61539efc2b
commit e23eec8c9a
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 2 additions and 2 deletions

View File

@ -365,7 +365,7 @@ mix_pool(byte *pool)
memcpy(hashbuf, pend - DIGESTLEN, DIGESTLEN );
memcpy(hashbuf+DIGESTLEN, pool, BLOCKLEN-DIGESTLEN);
rmd160_mixblock( &md, hashbuf);
memcpy(pool, hashbuf, 20 );
memcpy(pool, hashbuf, DIGESTLEN);
p = pool;
for( n=1; n < POOLBLOCKS; n++ ) {
@ -384,7 +384,7 @@ mix_pool(byte *pool)
}
rmd160_mixblock( &md, hashbuf);
memcpy(p, hashbuf, 20 );
memcpy(p, hashbuf, DIGESTLEN);
}
burn_stack (384); /* for the rmd160_mixblock() */
}