diff --git a/keccak.cpp b/keccak.cpp index cba1cae..93bddab 100644 --- a/keccak.cpp +++ b/keccak.cpp @@ -54,7 +54,7 @@ namespace return (x << numBits) | (x >> (64 - numBits)); } - /// convert litte vs big endian + /// convert little vs big endian inline uint64_t swap(uint64_t x) { #if defined(__GNUC__) || defined(__clang__) diff --git a/sha256.cpp b/sha256.cpp index 8f0857d..06f50f8 100644 --- a/sha256.cpp +++ b/sha256.cpp @@ -130,7 +130,7 @@ void SHA256::processBlock(const void* data) x = b + f1(g,h,a) + 0x923f82a4 + words[ 6]; y = f2(c,d,e); f += x; b = x + y; x = a + f1(f,g,h) + 0xab1c5ed5 + words[ 7]; y = f2(b,c,d); e += x; a = x + y; - // secound round + // second round x = h + f1(e,f,g) + 0xd807aa98 + words[ 8]; y = f2(a,b,c); d += x; h = x + y; x = g + f1(d,e,f) + 0x12835b01 + words[ 9]; y = f2(h,a,b); c += x; g = x + y; x = f + f1(c,d,e) + 0x243185be + words[10]; y = f2(g,h,a); b += x; f = x + y; @@ -232,7 +232,7 @@ void SHA256::processBlock(const void* data) words[i-7] + (rotate(words[i- 2], 17) ^ rotate(words[i- 2], 19) ^ (words[i- 2] >> 10)); - // eigth round + // eighth round x = h + f1(e,f,g) + 0x748f82ee + words[56]; y = f2(a,b,c); d += x; h = x + y; x = g + f1(d,e,f) + 0x78a5636f + words[57]; y = f2(h,a,b); c += x; g = x + y; x = f + f1(c,d,e) + 0x84c87814 + words[58]; y = f2(g,h,a); b += x; f = x + y; diff --git a/sha3.cpp b/sha3.cpp index 2f6bc7b..0d762d3 100644 --- a/sha3.cpp +++ b/sha3.cpp @@ -56,7 +56,7 @@ namespace return (x << numBits) | (x >> (64 - numBits)); } - /// convert litte vs big endian + /// convert little vs big endian inline uint64_t swap(uint64_t x) { #if defined(__GNUC__) || defined(__clang__)