Fossil SCM

The smallest SHA3 hash size is 224 bits, not 228 bits.

drh 2017-02-27 14:46 trunk
Commit 5ed8477b6c65b3286a14b92abb9c925d7a63ccf2
1 file changed +2 -2
+2 -2
--- src/sha3.c
+++ src/sha3.c
@@ -608,11 +608,11 @@
608608
** Compute an SHA3 checksum of all files named on the command-line.
609609
** If a file is named "-" then take its content from standard input.
610610
**
611611
** Options:
612612
**
613
-** --228 Compute a SHA3-228 hash (the default)
613
+** --224 Compute a SHA3-224 hash (the default)
614614
** --256 Compute a SHA3-256 hash
615615
** --384 Compute a SHA3-384 hash
616616
** --512 Compute a SHA3-512 hash
617617
** --size N An N-bit hash. N must be a multiple of 32 between 128
618618
** and 512.
@@ -621,11 +621,11 @@
621621
int i;
622622
Blob in;
623623
Blob cksum;
624624
int iSize = 224;
625625
626
- if( find_option("228",0,0)!=0 ) iSize = 228;
626
+ if( find_option("224",0,0)!=0 ) iSize = 224;
627627
else if( find_option("256",0,0)!=0 ) iSize = 256;
628628
else if( find_option("384",0,0)!=0 ) iSize = 384;
629629
else if( find_option("512",0,0)!=0 ) iSize = 512;
630630
else{
631631
const char *zN = find_option("size",0,1);
632632
--- src/sha3.c
+++ src/sha3.c
@@ -608,11 +608,11 @@
608 ** Compute an SHA3 checksum of all files named on the command-line.
609 ** If a file is named "-" then take its content from standard input.
610 **
611 ** Options:
612 **
613 ** --228 Compute a SHA3-228 hash (the default)
614 ** --256 Compute a SHA3-256 hash
615 ** --384 Compute a SHA3-384 hash
616 ** --512 Compute a SHA3-512 hash
617 ** --size N An N-bit hash. N must be a multiple of 32 between 128
618 ** and 512.
@@ -621,11 +621,11 @@
621 int i;
622 Blob in;
623 Blob cksum;
624 int iSize = 224;
625
626 if( find_option("228",0,0)!=0 ) iSize = 228;
627 else if( find_option("256",0,0)!=0 ) iSize = 256;
628 else if( find_option("384",0,0)!=0 ) iSize = 384;
629 else if( find_option("512",0,0)!=0 ) iSize = 512;
630 else{
631 const char *zN = find_option("size",0,1);
632
--- src/sha3.c
+++ src/sha3.c
@@ -608,11 +608,11 @@
608 ** Compute an SHA3 checksum of all files named on the command-line.
609 ** If a file is named "-" then take its content from standard input.
610 **
611 ** Options:
612 **
613 ** --224 Compute a SHA3-224 hash (the default)
614 ** --256 Compute a SHA3-256 hash
615 ** --384 Compute a SHA3-384 hash
616 ** --512 Compute a SHA3-512 hash
617 ** --size N An N-bit hash. N must be a multiple of 32 between 128
618 ** and 512.
@@ -621,11 +621,11 @@
621 int i;
622 Blob in;
623 Blob cksum;
624 int iSize = 224;
625
626 if( find_option("224",0,0)!=0 ) iSize = 224;
627 else if( find_option("256",0,0)!=0 ) iSize = 256;
628 else if( find_option("384",0,0)!=0 ) iSize = 384;
629 else if( find_option("512",0,0)!=0 ) iSize = 512;
630 else{
631 const char *zN = find_option("size",0,1);
632

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button