Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thebluesky/dotnet-hash
A simple dotnet tool to calculate hashes
https://github.com/thebluesky/dotnet-hash
algorithm base64 dotnet dotnet-tool hash hash-algorithm hex md5 sha1 sha2 sha256 sha384 sha512
Last synced: 7 days ago
JSON representation
A simple dotnet tool to calculate hashes
- Host: GitHub
- URL: https://github.com/thebluesky/dotnet-hash
- Owner: TheBlueSky
- License: mit
- Created: 2018-08-25T07:41:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-14T19:59:28.000Z (3 months ago)
- Last Synced: 2025-01-16T03:11:52.940Z (14 days ago)
- Topics: algorithm, base64, dotnet, dotnet-tool, hash, hash-algorithm, hex, md5, sha1, sha2, sha256, sha384, sha512
- Language: C#
- Size: 21.5 KB
- Stars: 27
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE.txt
Awesome Lists containing this project
README
dotnet-hash
===========[![Build](https://img.shields.io/azure-devops/build/thebluesky/c81281f3-f29c-4f59-87e5-dca12f44d979/2)][1] ![NuGet](https://img.shields.io/nuget/v/TheBlueSky.DotNet.Tools.SwiftHash) [![NuGet](https://img.shields.io/nuget/dt/TheBlueSky.DotNet.Tools.SwiftHash)][2]
A simple dotnet tool to calculate hashes for the given file.
The tool calculates MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes for any file and outputs the result as Base64 or Hex string.
## Installation
To install the tool you need to install [.NET 6.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0), [.NET 7.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/7.0), [.NET 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0), or [.NET 9.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/9.0). Once installed, run this command:
```powershell
dotnet tool install TheBlueSky.DotNet.Tools.SwiftHash --global
```## Usage
```
Usage: dotnet hash [arguments] [options]Arguments:
path Path to the file to calculate the hash forOptions:
-?|-h|--help Show help information
-a|--algorithm The hashing algorithm
-o|--out The output formatThe tool calculates MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes
for any file and outputs the result as Base64 or Hex string.
The bigger the file is, the longer it takes to calculate the hash.
```For example:
```powershell
dotnet hash readme.md --algorithm sha256 --out hex
```Valid `algorithm`:
* `md5`
* `sha1`
* `sha256`
* `sha384`
* `sha512`Valid `out`:
* `base64`
* `hex`[1]: https://thebluesky.visualstudio.com/dotnet-hash/_build/latest?definitionId=2&branchName=master
[2]: https://www.nuget.org/packages/TheBlueSky.DotNet.Tools.SwiftHash/