Browse Source

one more readable for loop

Karel Miko 8 years ago
parent
commit
4e66160ac2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/hashes/sha3.c

+ 3 - 1
src/hashes/sha3.c

@@ -241,7 +241,9 @@ int sha3_done(hash_state *md, unsigned char *hash)
    keccakf(md->sha3.s);
    keccakf(md->sha3.s);
 
 
    /* store sha3.s[] as little-endian bytes into sha3.sb */
    /* store sha3.s[] as little-endian bytes into sha3.sb */
-   for(i = 0; i < SHA3_KECCAK_SPONGE_WORDS; i++) STORE64L(md->sha3.s[i], md->sha3.sb + i * 8);
+   for(i = 0; i < SHA3_KECCAK_SPONGE_WORDS; i++) {
+      STORE64L(md->sha3.s[i], md->sha3.sb + i * 8);
+   }
 
 
    XMEMCPY(hash, md->sha3.sb, md->sha3.capacity_words * 4);
    XMEMCPY(hash, md->sha3.sb, md->sha3.capacity_words * 4);
    return CRYPT_OK;
    return CRYPT_OK;