GithubHelp home page GithubHelp logo

lookbusy1344 / hashrust Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 91 KB

CLI file hashing using Rust

License: MIT License

PowerShell 9.42% Rust 90.58%
cli hashing sha1 sha2 sha3 blake2 whirlpool md5

hashrust's Introduction

Hash Rust

Build and test

A small CLI project to hash files using various algorithms, using Rust

HashRust is a command-line util for hashing files. Supports MD5, SHA1, SHA2, SHA3, Blake2 and Whirlpool. Multi-threaded by default using Rayon.

Building

cargo build -r

It was build on Windows, but has an option to behave in a case-sensitive way for Linux.

Usage

hash_rust.exe filespec [flags] [options]

For example:
  hash_rust.exe *.txt -a sha2
  hash_rust.exe *.txt --algorithm md5 --debug

Or pipe in a list of files:
  dir *.txt /b | hash_rust.exe

Flags

    -h, --help                   Prints help information
    -d, --debug                  Debug messages
    -c, --case-sensitive         Case-sensitive glob matching
    -x, --exclude-filenames      Exclude filenames from output
    -s, --single-thread          Single-threaded (not multi-threaded)

Options

    -a, --algorithm [algorithm]  Hash algorithm to use
    -e, --encoding [encoding]    Encoding to use (hex, base64, base32)
    -l, --limit [num]            Limit number of files processed (eg only process the first one)

CRC32 can only be output as 32-bit integer, the -e option cannot be used with it.

Algorithms supported

    MD5, SHA1,
    WHIRLPOOL, BLAKE2S-256, BLAKE2B-512,
    SHA2 / SHA2-256, SHA2-224, SHA2-384, SHA2-512, 
    SHA3 / SHA3-256, SHA3-384, SHA3-512

    The default is SHA3-256

Powershell integration

The project also includes a Powershell wrapper to parse the output into useful objects.

$results = dir *.txt | .\hashfile.ps1 -algorithm sha3
..or..
$results = .\hashfile.ps1 *.txt -algorithm sha3

$results

hashrust's People

Contributors

dependabot[bot] avatar lookbusy1344 avatar

Watchers

 avatar  avatar

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.