#checksum #blake2b #hash #calculate #command-line-tool #libsodium #file

yanked b2b

A command line utility to calculate BLAKE2b checksums

Uses old Rust 2015

0.1.0 Apr 25, 2016

#20 in #blake2b

Apache-2.0

20KB
152 lines

b2b

Build Status

b2b is a command line tool to calculate BLAKE2b hashes based on libsodium and sodiumoxide.

b2b 0.1.0
Dave Parfitt <diparfitt@gmail.com>
Calculates BLAKE2b checksums using libsodium

USAGE:
    b2b [FLAGS] [OPTIONS] <FILE>

FLAGS:
        --base64     Display the value in RFC 4648 standard base64 encoding instead of hex
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -l, --length <HASH_LENGTH>    Size of hash in bytes, default: 32

ARGS:
    <FILE>    Input filename or - to read from <stdin>

Installing

You'll need the cargo command from Rust and libsodium-dev installed.

cargo install b2b

If this fails because Cargo can't find libsodium (typically OSX), try setting the following environment variables to the appropriate values:

# SODIUM_LIB_DIR must end with /lib
export SODIUM_LIB_DIR=/some/path/ending/with/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SODIUM_LIB_DIR
cargo install b2b

Building from source

b2b is written in Rust.

Ubuntu

TODO: untested

apt-get install libsodium-dev
cargo build

OSX

brew install libsodium
export SODIUM_LIB_DIR=`brew info libsodium | grep Cellar | awk '{ print $1 }'`/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SODIUM_LIB_DIR
cargo build

License

b2b is released under the Apache 2 license.

See also:


© 2016 Dave Parfitt

Dependencies

~20MB
~111K SLoC