@@ -81,6 +81,8 @@ static void print_help(void)
81
81
print_help_line (" -H, --sha1 " , digest_format , "SHA1" );
82
82
print_help_line (" --sha224, --sha256, --sha384, --sha512 " , digest_format , "SHA2" );
83
83
print_help_line (" --sha3-224, --sha3-256, --sha3-384, --sha3-512 " , digest_format , "SHA3" );
84
+ print_help_line (" --blake2s, --blake2b " , digest_format , "BLAKE2S/BLAKE2B" );
85
+ print_help_line (" --blake3 " , digest_format , "BLAKE3" );
84
86
print_help_line (" -T, --tth " , digest_format , "TTH" );
85
87
print_help_line (" --btih " , digest_format , "BitTorrent InfoHash" );
86
88
print_help_line (" -A, --aich " , digest_format , "AICH" );
@@ -95,7 +97,6 @@ static void print_help(void)
95
97
print_help_line (" --gost94-cryptopro " , digest_format , _ ("GOST R 34.11-94 CryptoPro" ));
96
98
print_help_line (" --ripemd160 " , digest_format , "RIPEMD-160" );
97
99
print_help_line (" --has160 " , digest_format , "HAS-160" );
98
- print_help_line (" --blake2s, --blake2b " , digest_format , "BLAKE2S/BLAKE2B" );
99
100
print_help_line (" --edonr256, --edonr512 " , digest_format , "EDON-R 256/512" );
100
101
print_help_line (" --snefru128, --snefru256 " , digest_format , "SNEFRU-128/256" );
101
102
print_help_line (" -a, --all " , _ ("Calculate all supported hash functions.\n" ));
@@ -169,7 +170,10 @@ static void list_hashes(void)
169
170
*/
170
171
static void add_hash_id (options_t * o , unsigned hash_id )
171
172
{
172
- o -> hash_mask |= hash_id_to_bit64 (hash_id );
173
+ if (hash_id == RHASH_ALL_HASHES )
174
+ o -> hash_mask = get_all_supported_hash_mask ();
175
+ else
176
+ o -> hash_mask |= hash_id_to_bit64 (hash_id );
173
177
}
174
178
175
179
/**
@@ -451,6 +455,7 @@ cmdline_opt_t cmdline_opt[] =
451
455
{ F_VFNC , 0 , 0 , "edonr512" , (opt_handler_t )add_hash_id , 0 , RHASH_EDONR512 },
452
456
{ F_VFNC , 0 , 0 , "blake2s" , (opt_handler_t )add_hash_id , 0 , RHASH_BLAKE2S },
453
457
{ F_VFNC , 0 , 0 , "blake2b" , (opt_handler_t )add_hash_id , 0 , RHASH_BLAKE2B },
458
+ { F_VFNC , 0 , 0 , "blake3" , (opt_handler_t )add_hash_id , 0 , RHASH_BLAKE3 },
454
459
455
460
/* output formats */
456
461
{ F_UFLG , 0 , 0 , "sfv" , 0 , & opt .fmt , FMT_SFV },
@@ -1114,6 +1119,7 @@ static void set_default_hash_mask(const char* progName)
1114
1119
if (strstr (buf , "edonr512" )) add_hash_id (& opt , RHASH_EDONR512 );
1115
1120
if (strstr (buf , "blake2s" )) add_hash_id (& opt , RHASH_BLAKE2S );
1116
1121
if (strstr (buf , "blake2b" )) add_hash_id (& opt , RHASH_BLAKE2B );
1122
+ if (strstr (buf , "blake3" )) add_hash_id (& opt , RHASH_BLAKE3 );
1117
1123
if (strstr (buf , "snefru256" )) add_hash_id (& opt , RHASH_SNEFRU128 );
1118
1124
if (strstr (buf , "snefru128" )) add_hash_id (& opt , RHASH_SNEFRU256 );
1119
1125
else if (strstr (buf , "ed2k" )) add_hash_id (& opt , RHASH_ED2K );
0 commit comments