multibase-cli

Crates.iomultibase-cli
lib.rsmultibase-cli
version0.1.1
sourcesrc
created_at2019-10-23 23:13:33.722604
updated_at2019-10-23 23:19:26.942405
descriptionconvert between multibase encodings
homepage
repositoryhttps://github.com/docknetwork/multibase-cli
max_upload_size
id175042
size17,431
Andrew Dirksen (bddap)

documentation

README

Multibase converter

Command line tool for converting {to,from,between} multibase encodings.

Uses the multibase crate.

Usage

echo -n "hey" | multibase base2
# 011010000110010101111001

multibase decode 011010000110010101111001
# hey

echo -n 011010000110010101111001 | multibase decode
# hey

Multibase does encode newlines.

echo hey | multibase base58btc
# z3fmoA9

echo -n hey | multibase base58btc
# zc4oi

Multibase is strict about the input it accepts. It won't decode newlines unless they are valid parts of the input encoding.

# this will fail because echo appends a '\n' character to its output
echo 011010000110010101111001 | multibase decode

# try one of these instead
echo -n 011010000110010101111001 | multibase decode
printf "%s" 011010000110010101111001 | multibase decode
multibase decode 011010000110010101111001

Installation

cargo install multibase-cli

Known issues

Multibase encodings with padding are not yet supported. To make them supported, rust-multibase must push recent changes to crates.io. https://github.com/multiformats/rust-multibase/issues/12

The identity encoding is not yet supported.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 6

cargo fmt