gb3sum

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

README

gb3sum

CI Go Reference Go version

gb3sum is a command-line utility for printing and checking BLAKE3 checksums.

gb3sum is written in Go and compiles into a single binary with no external dependencies.

Installation

From source
go install github.com/sorairolake/gb3sum@latest
Via a package manager
OS Package manager Command
Any Homebrew brew install sorairolake/tap/gb3sum
From binaries

The release page contains pre-built binaries for Linux, macOS, Windows and others.

How to build

Please see BUILD.adoc.

Usage

Basic usage
Print BLAKE3 checksums
echo "Hello, world!" > foo.txt
gb3sum foo.txt | tee b3sums.txt

Output:

94f1675bac4f8bc3c593c63dbf5fe78a0bfda01082af85d5b41a65096db56bff  foo.txt
Check BLAKE3 checksums
gb3sum -c b3sums.txt

Output:

foo.txt: OK
Generate shell completion

--generate-completion option generates shell completions to stdout.

The following shells are supported:

  • bash
  • fish
  • powershell
  • zsh

Example:

gb3sum --generate-completion bash > gb3sum.bash

Command-line options

Please see the following:

Changelog

Please see CHANGELOG.adoc.

Contributing

Please see CONTRIBUTING.adoc.

Comparisons

gb3sum supports a command-line syntax similar but not identical to coreutils's md5sum.

Differences to coreutils's md5sum
  • gb3sum doesn't have options to specify the input mode (-b and -t).
  • gb3sum always treats files as binary file.
  • gb3sum doesn't have an option to terminate output lines with NUL (-z).
  • gb3sum has an option to specify the number of output bytes like coreutils's b2sum (-l).
Differences to b3sum

Unlike b3sum, gb3sum doesn't support keyed hashing and key derivation. Use b3sum instead of gb3sum for those purposes.

License

Copyright © 2024 Shun Sakai (see AUTHORS.adoc)

  1. This program is distributed under the terms of the GNU General Public License v3.0 or later.
  2. Some files are distributed under the terms of the Creative Commons Attribution 4.0 International Public License.

This project is compliant with version 3.0 of the REUSE Specification. See copyright notices of individual files for more details on copyright and licensing information.

Documentation

Overview

Gb3sum prints and checks BLAKE3 checksums.

Usage:

gb3sum [OPTIONS] [FILE]...

Arguments:

[FILE]
	Files to hash, or checksum files to check.

Options:

-c, --check
	Read checksums from _FILE_ and check them.
-l, --length <BYTE>
	The number of output bytes.
--tag
	Print BSD-style output.
--ignore-missing
	Ignore missing files when checking checksums.
-q, --quiet
	Skip printing OK for each successfully verified file.
--status
	Indicates the validation result with the exit status without
	printing anything.
--strict
	Exit non-zero if any line in the file is invalid.
-w, --warn
	Warn about improperly formatted checksum lines.
-h, --help
	Print help message.
-v, --version
	Print version number.
--generate-completion <SHELL>
	Generate shell completion.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL