Skip to content

vijayshinva/kryptos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kryptos

A .NET core tool for cryptography.

.NET Core CodeFactor NuGet version

Overview

Features

  • UUID generation
  • Base64, Base64Url encoding and decoding
  • MD5 Hash
  • SHA-1, SHA-256, SHA-384, SHA-512 Hash
  • JWT decoding
  • HMAC-SHA1, HMAC-SHA256, HMAC-SHA384, HMAC-SHA512, HMAC-MD5
  • Subresource Integrity
  • Cryptographic Object Identifier lookup
  • Create self-signed certificates (PFX)
  • Encryption and decryption using PFX
  • Random Number Generator
  • Zip file content information

Installation

Kryptos is available as a .NET Global Tool and can be installed using the .NET Core CLI.

dotnet tool install --global Kryptos

For offline installation, download the nuget package into a folder and run the following command.

dotnet tool install --global Kryptos --add-source FolderWithKryptosNuget\ 

Kryptos is under active development and new features are being added. Update to the latest version using the command below.

dotnet tool update --global Kryptos

Usage

kryptos --help

Examples

  1. Decode Base64 encoded string
    kryptos base64 dec -t "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4="
    
  2. Generate SHA-256 hash of file
    kryptos sha256 hash -i .\ubuntu-20.04-desktop-amd64.iso
    
  3. Decode a JWT token
    kryptos jwt dec -t eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlZpamF5c2hpbnZhIEthcm51cmUiLCJpYXQiOjE1MTYyMzkwMjIsImF1ZCI6Imh0dHBzOi8vZ2l0aHViLmNvbS92aWpheXNoaW52YS9rcnlwdG9zIn0.ufklYra5bLYKM-FWnmxI0Tsw_ILmTIDK0cJ7ZkPfwfE
    
  4. Generate Subresource Integrity
    kryptos sri hash -u https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css
    
  5. Look up Cryptographic Object Identifier
    kryptos oid -t 1.3.6.1.5.5.7.3.1
    
  6. Generate a self-signed PFX certificate
    kryptos pfx create -st www.contoso.com -kt password -o contoso.pfx
    
  7. Encrypt text using a PFX certificate
    kryptos pfx enc -ci contoso.pfx -kt password -t "The quick brown fox jumps over the lazy dog."
    

Contributing

  • Fork the repo on GitHub
  • Clone the project to your own machine
  • Commit changes to vnext branch
  • Push your work back up to your fork
  • Be sure to pull the latest from "upstream" before making a pull request!
  • Submit a Pull Request so that changes can be reviewed and merged

NOTE: By raising a Pull Request you grant the guardians of this project the necessary ownership or grants of rights over all contributions to distribute under the chosen license.

LICENSE

license FOSSA Status

FOSSA Status