aboutsummaryrefslogblamecommitdiffstats
path: root/bsum.1
blob: 89ef96f94ac9e6c091634d0437d50c55a86fe569 (plain) (tree)
1
2
3
4
5
6




                                              
                                             






















                                                                
                               





                                                                    
              


                                                   






















                                                            































                                                          





                
.TH BSUM 1 blakesum
.SH NAME
bsum - Compute and check BLAKE message digests
.SH SYNOPSIS
.B bsum
[-l bits] [-c | -B | -L | -U] [-S salt] [-xz]
.RI [ file "] ..."
.SH DESCRIPTION
Print or check BLAKE checksums.
.SH OPTIONS
The
.B bsum
utility conforms to the Base Definitions volume of POSIX.1-2017,
.IR "Section 12.2" ,
.IR "Utility Syntax Guidelines" .
.PP
The following options are supported:
.TP
.B -B
Output checksums in binary representation. This suppresses
the filenames and checksum delimiters. Only the checksums
are printed.
.TP
.B -c
Read BLAKE sums from the file and check them against the
files on your systems. The input files files should be
formatted as the output of this program, or similarly.
This is not going to work if any of the filenames in the
input files starts with <space> or <tab>, or if they
contain a <newline>, unless the
.B -z
option is also used.
.TP
.B -L
Output checksums in lower-case hexadecimal representation. (Default)
.TP
.BI "-l " bits
Select version of the BLAKE algorithm. Valid values
are 224 (default), 256, 384, and 512.
.TP
.BI "-S " salt
Specify a 16-byte (for the 224 and 256 bit versions) or
32-byte salt (for the 384 and 512 bit versions) that the
BLAKE algorithm shall use. This salt shall be expressed
in full length hexadecimal: 32 (for 16-bytes) or 64
(for 32-bytes) hexadecimal digits, or rather 16 or 32 pairs
of hexadecimal digits, ordered from left to right to specify
the values from index 0 to the last byte. In each pair,
the left digit stores the high bits of the byte, and the
right digit stores the low bits of the byte. For example,
the digit pair
.B 80
represents a byte with the decimal value 128, whereas the
digit pair
.B 08
represents a byte with the decimal value 8. The pairs
are joined without any delimiters, and no byte may be
omitted. So, for a 16 byte salt where each byte's value
is its index, the salt is expressed as,
.BR 000102030405060708090a0b0c0d0e0f ,
however each letter may be either small or capital.
If no salt is specified, an all-zeroes salt is used.
.TP
.B -U
Output checksums in upper-case hexadecimal representation.
.TP
.B -x
Convert input files from hexadecimal form to binary form
before calculating the checksums.
.TP
.B -z
Lines end with NUL instead of LF. If used with
.BR -c ,
this applies to read files (not the output), but it will
also apply more strict parsing and allow any whitespace
in file names.
.SH OPERANDS
The following operands are supported:
.TP
.I file
File to read. The standard input will be used
.B -
or no
.I file
is specified.
.SH EXIT STATUS
.TP
0
Successful completion.
.TP
1
Checksums did not match or a file did not exist.
.TP
2
An error occurred.
.SH SEE ALSO
.BR b2sum (1),
.BR b224sum (1),
.BR b256sum (1),
.BR b384sum (1),
.BR b512sum (1)