Coder Social home page Coder Social logo

keinos / brew-multihash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from multiformats/go-multihash

0.0 0.0 0.0 232 KB

Repo to homebrew multihash. Which is a command that returns a self-explanatory hash value.

License: MIT License

Go 100.00%

brew-multihash's Introduction

Homebrew release of Multihash Tool

This is the unofficial "Homebrew" version of the multihash tool command, which can be easily installed in non-Golang environments.

Its purpose is to check multi-hash values without the need to use or install IPFS.

# macOS and Linux (AMD64, ARM64/M1)
brew install KEINOS/apps/multihash

Same as "go-multihash", but with the following differences:

  • Version display.
  • Unit tested.
  • golangci-lint checked.
  • golint checked.

Usage

multihash [options] [FILE]
$ echo 'Hello, world!' | multihash
QmcwkKyBLujMQitrGSLdtFTzEYSzA7VcfARhFHbe4hZJc4

$ echo 'Hello, world!' | multihash -algorithm sha2-256 -encoding base58
QmcwkKyBLujMQitrGSLdtFTzEYSzA7VcfARhFHbe4hZJc4

$ echo 'Hello, world!' | multihash -a sha3-512 -e base64
FECMLmMwD5Ykttd2lf9/YCAcojWVCWxApTWrl425lyBO7BBmw/PULIaJWLu9+36c46LYg+GVEqkNlNvMksELCmQv
$ cat ./sample.txt
Hello, world!

$ multihash ./sample.txt
QmcwkKyBLujMQitrGSLdtFTzEYSzA7VcfARhFHbe4hZJc4
$ multihash -h
usage: multihash [options] [FILE]
Print or check multihash checksums.
With no FILE, or when FILE is -, read standard input.

Options:
  -a string
        one of: blake2b-128, blake2b-224, blake2b-256, blake2b-384, blake2b-512, blake2s-256, blake3, dbl-sha2-256, identity, keccak-224, keccak-256, keccak-384, keccak-512, md5, murmur3-x64-64, poseidon-bls12_381-a2-fc1, sha1, sha2-256, sha2-256-trunc254-padded, sha2-512, sha3, sha3-224, sha3-256, sha3-384, sha3-512, shake-128, shake-256, x11 (shorthand) (default "sha2-256")
  -algorithm string
        one of: blake2b-128, blake2b-224, blake2b-256, blake2b-384, blake2b-512, blake2s-256, blake3, dbl-sha2-256, identity, keccak-224, keccak-256, keccak-384, keccak-512, md5, murmur3-x64-64, poseidon-bls12_381-a2-fc1, sha1, sha2-256, sha2-256-trunc254-padded, sha2-512, sha3, sha3-224, sha3-256, sha3-384, sha3-512, shake-128, shake-256, x11 (default "sha2-256")
  -c string
        check checksum matches (shorthand)
  -check string
        check checksum matches
  -e string
        one of: raw, hex, base58, base64 (shorthand) (default "base58")
  -encoding string
        one of: raw, hex, base58, base64 (default "base58")
  -h    display help message (shorthand)
  -help
        display help message
  -l int
        checksums length in bits (truncate). -1 is default (shorthand) (default -1)
  -length int
        checksums length in bits (truncate). -1 is default (default -1)
  -q    quiet output (no newline on checksum, no error text) (shorthand)
  -quiet
        quiet output (no newline on checksum, no error text)
  -v    display app version (shorthand)
  -version
        display app version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.