GithubHelp home page GithubHelp logo

nwtgck / digestream Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 24 KB

CLI for streaming message digest calculator - Insert into pipe, get the digest in tty

License: MIT License

Go 100.00%
digest hash golang cli stream pipe digest-calculation message-digest

digestream's Introduction

digestream

CircleCI

Streaming message digest calculator: Insert digest calculation inside pipe

Installation

Get executable binaries from GitHub Releases

Usage

Here is an example to use digestream. The command below allows you to download ubuntu.iso and calculate message digest at the same time.

curl http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.iso | digestream > ubuntu.iso

Then you will have a SHA-256 digest as follows in tty.

5748706937539418ee5707bd538c4f5eabae485d17aa49fb13ce2c9b70532433

Note that the message digest, 5748706937...433 is output to tty not to stdout.
The command above is the same as curl ... > ubuntu.iso except for digest calculation.

Motivation

One of the motivations of digestream is for Piping Server, which is a server to allow users to transfer data via HTTP.
You can get more information in https://github.com/nwtgck/piping-server.

By using digestream, users get more confident to send data correctly.

# Sender
seq 1000 | digestream | curl -T - https://piping.glitch.me/myseq
# Receiver
curl https://piping.glitch.me/myseq | digestream > myseq.txt

Algorithms

Here is examples to use md5, sham256 and sha512. In current implementation, sham256 is the default algorithm. But the default algorithm may be changed in the future by technology improvement.

echo "hello, world" | digestream md5
echo "hello, world" | digestream sha256
echo "hello, world" | digestream sha512

Available algorithms

You can get all algorithms by digestream -h.

Dige(st + St)ream

Usage:
  digestream [flags]
  digestream [command]

Available Commands:
  help        Help about any command
  md5         MD5
  sha1        SHA-1
  sha256      SHA-256
  sha512      SHA-512

Flags:
  -h, --help   help for digestream

Use "digestream [command] --help" for more information about a command.

digestream's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar nwtgck avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

digestream's Issues

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

gopkg.in/[email protected]: unrecognized import path "gopkg.in/yaml.v2" (parse https://gopkg.in/yaml.v2?go-get=1: no go-import meta tags ())

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

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.