diff options
Diffstat (limited to 'README')
-rw-r--r-- | README | 288 |
1 files changed, 288 insertions, 0 deletions
@@ -0,0 +1,288 @@ +NAME + anysum - compute or verify against multiple checksums + +SYNOPSIS + anysum (-c [-w] | [-a algoritms] ...) [-W options] ... + [-z] [file] ... + +DESCRIPTION + The anysum utility can calculate checksums of a file using + multiple hash functions, or using different parameters for + the function, in parallel (the utility can calculate checksums + for multiple files, but these are not calculated in parallel). + + The anysum utility can also check a file against multiple + checksums using multiple hash function and hash function + parameters in parallel, and check that the file matches at + least one of the listed checksums. + +OPTIONS + The anysum utility conforms to the Base Definitions volume of + POSIX.1-2017, Section 12.2, Utility Syntax Guidelines. + + The following options are supported: + + -a algorithms + Comma-separated list of hash functions and + parameters to compute checksums with. + + Currently supported values are: + + md2 + For MD2. + + md4 + For MD4. + + md5 + For MD5. + + ripemd128 or rmd128 + For RIPEMD-128. + + ripemd160 or rmd160 + For RIPEMD-160. + + ripemd256 or rmd256 + For RIPEMD-256. + + ripemd320 or rmd320 + For RIPEMD-320. + + sha0 + For SHA-0. + + sha1 + For SHA-1. + + sha224 + For the 224 bit version of SHA-2. + + sha256 + For the 256 bit version of SHA-2. + + sha384 + For the 384 bit version of SHA-2. + + sha512 + For the 512 bit version of SHA-2. + + sha512/224 + For the 224 bit output variant of the + 512 (and 384) bit version of SHA-2. + + sha512/256 + For the 256 bit output variant of the + 512 (and 384) bit version of SHA-2. + + keccak[r=BITRATE,c=CAPACITY,n=LENGTH,z=SQUEEZES] + For Keccak. The brackets and there parameter + list, and each parameter, are optional. Any + parameter the is skipped is automatically + determined. BITRATE and CAPACITY are the + Keccak function's bitrate and capacity bit + bits, and LENGTH is the hash length is bits. + SQUEEZES is the number of squeezes to perform + after a input has been feed into the function; + the default is one, and any number in excess + of this is the number of squeezes to perform + before squeezing out the hash. + + keccak-224 + For Keccak[r=1152,c=448,n=224]. + + keccak-256 + For Keccak[r=1088,c=512,n=256]. + + keccak-384 + For Keccak[r=832,c=768,n=384]. + + keccak-512 + For Keccak[r=576,c=1024,n=512]. + + sha3-224 + For the 224 bit version of SHA-3. + + sha3-256 + For the 256 bit version of SHA-3. + + sha3-384 + For the 384 bit version of SHA-3. + + sha3-512 + For the 512 bit version of SHA-3. + + shake-128[n=LENGTH] + For the 128 bit version of SHAKE. The brackets + and n=LENGTH are optional; LENGTH shall the + output size in bits (default is 128). + + shake-256[n=LENGTH] + For the 256 bit version of SHAKE. The brackets + and n=LENGTH are optional; LENGTH shall the + output size in bits (default is 256). + + shake-512[n=LENGTH] + For the 512 bit version of SHAKE. The brackets + and n=LENGTH are optional; LENGTH shall the + output size in bits (default is 512). + + rawshake-128[n=LENGTH] + For the 128 bit version of RawSHAKE. The + brackets and n=LENGTH are optional; LENGTH + shall the output size in bits (default is 128). + + rawshake-256[n=LENGTH] + For the 256 bit version of RawSHAKE. The + brackets and n=LENGTH are optional; LENGTH + shall the output size in bits (default is 256). + + rawshake-512[n=LENGTH] + For the 512 bit version of RawSHAKE. The + brackets and n=LENGTH are optional; LENGTH + shall the output size in bits (default is 512). + + blake224[salt=SALT] or b224[salt=SALT] + For the 224 bit version of BLAKE. The brackets + and salt=SALT are optional; SALT shall be a 32 + character long hexadecimal value. + + blake256[salt=SALT] or b256[salt=SALT] + For the 256 bit version of BLAKE. The brackets + and salt=SALT are optional; SALT shall be a 32 + character long hexadecimal value. + + blake384[salt=SALT] or b384[salt=SALT] + For the 384 bit version of BLAKE. The brackets + and salt=SALT are optional; SALT shall be a 64 + character long hexadecimal value. + + blake512[salt=SALT] or b512[salt=SALT] + For the 512 bit version of BLAKE. The brackets + and salt=SALT are optional; SALT shall be a 64 + character long hexadecimal value. + + The utility does also recognise similar values + that are obviously equivalent. + + -b + Read in binary mode when computing hashes. + + -c + Verify the the files listed in file against the + checksums listed on the same lines. The file + shall be formatted as the output of the utility + when this option is not used. See the STDOUT + section for more information. If a file is listed + multiple times, it need only match one of the + checksums listed for the file. + + The length of the listed checksums need not match + the length output by this utility; before the + checksums are compared, they are truncated to the + shorter of the two checksums. + + -t + Read in text mode when computing hashes. + + -W options + Comma-sepearated list of implementation-specific + options. The following options are supported: + + output=format + format shall be "lowercase" if the checksums + shall be printed in lowercase hexadecimal + format (default), "uppercase" for uppercase + hexadecimal format, or "binary" for binary + format without anything but the checksum + printed to standard output. This option is + ignored if the -c option is used. + + input=format + format shall be "binary" if the files are + be read in binary mode, "text" if the files + shall be read in text mode, or "hexadecimal" + they shall be decoded from hexadecimal to + binary. If the -c option is used, the mode + specification associated with a file is + overrides this behaviour for that file if + the line specifies hexadecimal mode. + + threads=count + The maximum number of threads that the + utility may use. If "auto" is specified, + the utility selects a default value, which + currently is the number of online CPU threads + (at any time; assumed to be 8 if it cannot + be determined) minus 2, or 1 if this would + be less than 1. + + recursive + If a file operand is a directory, the checksum + is computed for all files recursively. + This option is ignored if the -c option is + used. + + no-recursive + The utility shall traverse directories. + (This is the default behaviour). + + -w + Warn about, but skip, lines that are not properly + formatted. + + -z + Use NUL byte as line ending instead of LF. + + There is no difference between binary mode and text mode, + so the -b and -t options are ignored. + +OPERANDS + The following operand is supported: + + file + The file to read and compute the checksum for, or if + the -c option is used, use as the listing of files + and checksums to verify the files against. If dash + ('-') is used or if no file operand is specified, + standard input will be used. + +STDOUT + If the -c option is not used, the utility shall print the + following line for each calculated checksum, however there + are options that modify the format; see the OPTIONS section + for more information: + + "%s:%s %c%s\n", <hash function>, <hash>, <mode>, + <file> + + where <mode> is SP (' ') for text mode, an asterisk ('*') + for binary mode, or a pound sign ('#') for hexadecimal + mode; however if there is no difference between binary + mode and text mode and either is selected, SP (' ') + (text mode) is used. + + If the -c option the output shall be on the format: + + "%s: %s\n", <file>, <validity> + + where <validity> is an implementation specified string + that describes whether the checksum was valid (possibly + with remarks), the file did not exist, the file could + not be read (possibly with error information), or if + the checksum was invalid or could not be compared + (possibly with remarks). The -z option does not modify + the line ending. + +EXIT STATUS + The following exit values are returned: + + 0 Successful completion. + + 1 Checksums did not match or a file did not exist. + + 2 An error occurred. + +NOTES + Other implementations do not necessarily recognise the + '#' mode specifier in checksum list files. |