Fossil SCM
The smallest SHA3 hash size is 224 bits, not 228 bits.
Commit
5ed8477b6c65b3286a14b92abb9c925d7a63ccf2
Parent
ccdafa2a93e7bce…
1 file changed
+2
-2
+2
-2
| --- src/sha3.c | ||
| +++ src/sha3.c | ||
| @@ -608,11 +608,11 @@ | ||
| 608 | 608 | ** Compute an SHA3 checksum of all files named on the command-line. |
| 609 | 609 | ** If a file is named "-" then take its content from standard input. |
| 610 | 610 | ** |
| 611 | 611 | ** Options: |
| 612 | 612 | ** |
| 613 | -** --228 Compute a SHA3-228 hash (the default) | |
| 613 | +** --224 Compute a SHA3-224 hash (the default) | |
| 614 | 614 | ** --256 Compute a SHA3-256 hash |
| 615 | 615 | ** --384 Compute a SHA3-384 hash |
| 616 | 616 | ** --512 Compute a SHA3-512 hash |
| 617 | 617 | ** --size N An N-bit hash. N must be a multiple of 32 between 128 |
| 618 | 618 | ** and 512. |
| @@ -621,11 +621,11 @@ | ||
| 621 | 621 | int i; |
| 622 | 622 | Blob in; |
| 623 | 623 | Blob cksum; |
| 624 | 624 | int iSize = 224; |
| 625 | 625 | |
| 626 | - if( find_option("228",0,0)!=0 ) iSize = 228; | |
| 626 | + if( find_option("224",0,0)!=0 ) iSize = 224; | |
| 627 | 627 | else if( find_option("256",0,0)!=0 ) iSize = 256; |
| 628 | 628 | else if( find_option("384",0,0)!=0 ) iSize = 384; |
| 629 | 629 | else if( find_option("512",0,0)!=0 ) iSize = 512; |
| 630 | 630 | else{ |
| 631 | 631 | const char *zN = find_option("size",0,1); |
| 632 | 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 | ** --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 |