Giter Site home page Giter Site logo

cryppo-cli's Introduction

Cryppo CLI

Meeco Encryption Library CLI

oclif Version Downloads/week License

Installation

  1. Download the gzip file appriate for your system from the releases page.
  2. Unzip the downloaded file to a destination of your choosing.
  3. Open up a terminal window inside the extracted cryppo folder.
  4. Change directory to the bin folder.
  5. Test that everything is working correctly by running the command ./cryppo genkey.
  6. Optionally on Mac or Linux add an alias to the cryppo executeable with echo "alias cryppo=\"${PWD}/cryppo\"" >> ~/.zshrc. (if you are not using zshell replace .zshrc with .bash_profile or .bashrc or whatever your system uses https://www.linuxjournal.com/content/profiles-and-rc-files)
  7. Open a new terminal window and you should be able to now use the cryppo command from anywhere and you'll no longer need to reference it relatively.

Usage

Basic example:

$ cryppo genkey
vm8CjugMda2zdjsI9W25nH-CY-84DDYoBxTFLwfKLDk=
$ cryppo encrypt -v "hello world" -k vm8CjugMda2zdjsI9W25nH-CY-84DDYoBxTFLwfKLDk=
Aes256Gcm.gSAByGMq4edzM0U=.LS0tCml2OiAhYmluYXJ5IHwtCiAgaW1QL09qMWZ6eWw0cmwwSgphdDogIWJpbmFyeSB8LQogIE5SbjZUQXJ2bitNS1Z5M0FpZEpmWlE9PQphZDogbm9uZQo=
$ cryppo decrypt -s "Aes256Gcm.gSAByGMq4edzM0U=.LS0tCml2OiAhYmluYXJ5IHwtCiAgaW1QL09qMWZ6eWw0cmwwSgphdDogIWJpbmFyeSB8LQogIE5SbjZUQXJ2bitNS1Z5M0FpZEpmWlE9PQphZDogbm9uZQo=" -k vm8CjugMda2zdjsI9W25nH-CY-84DDYoBxTFLwfKLDk=
hello world

RSA

$ cryppo genkeypair -p private.pem -P public.pem
$ cryppo encrypt -v "hello world" -P public.pem
$ cryppo decrypt -s <result of previous command> -p private.pem
$ cryppo sign -p private.pem myfile.txt myfile.signed.txt
$ cryppo verify -P public.pem myfile.signed.txt myfile.txt
$ cryppo COMMAND
running command...
$ cryppo (-v|--version|version)
cryppo-cli/2.0.0 darwin-x64 node-v12.22.1
$ cryppo --help [COMMAND]
USAGE
  $ cryppo COMMAND
...

Commands

cryppo decrypt

Decrypt a serialized encrypted value

Decrypt a serialized encrypted value

USAGE
  $ cryppo decrypt

OPTIONS
  -h, --help                           show CLI help
  -k, --key=key                        base64 encoded data encryption key
  -p, --privateKeyFile=privateKeyFile  private key file (if encrypting with RSA)
  -s, --serialized=serialized          (required) serialized encrypted value

EXAMPLES
  cryppo decrypt -s 
  "Aes256Gcm.gSAByGMq4edzM0U=.LS0tCml2OiAhYmluYXJ5IHwtCiAgaW1QL09qMWZ6eWw0cmwwSgphdDogIWJpbmFyeSB8LQogIE5SbjZUQXJ2bitNS1
  Z5M0FpZEpmWlE9PQphZDogbm9uZQo=" -k vm8CjugMda2zdjsI9W25nH-CY-84DDYoBxTFLwfKLDk=
  cryppo decrypt -s "Rsa4096.bJjV2g_RBZKeyqBr-dSjPAc3qtkTgd0=.LS0tCnt9Cg==" -p private.pem

See code: src/commands/decrypt.ts

cryppo encrypt

Encrypt a value (assumed to be UTF-8 encoded string)

Encrypt a value (assumed to be UTF-8 encoded string)

USAGE
  $ cryppo encrypt

OPTIONS
  -P, --publicKeyFile=publicKeyFile  public key file (if encrypting with RSA)
  -h, --help                         show CLI help
  -k, --key=key                      base64 encoded data encryption key (if encrypting with AES)
  -v, --value=value                  (required) value to encrypt

EXAMPLES
  encrypt -v "hello world" -k vm8CjugMda2zdjsI9W25nH-CY-84DDYoBxTFLwfKLDk=
  encrypt -v "hello world" -P public-key.pem

See code: src/commands/encrypt.ts

cryppo genkey

Generate a new encryption key of random bytes with the specified length - printed as url-safe base64

Generate a new encryption key of random bytes with the specified length - printed as url-safe base64

USAGE
  $ cryppo genkey

OPTIONS
  -l, --length=length  [default: 128] length of the key in bytes to generate: 128, 192 or 256

EXAMPLES
  cryppo genkey
  cryppo genkey -l 192

See code: src/commands/genkey.ts

cryppo genkeypair

Generate a new RSA key pair, writing the private and public keys to files.

Generate a new RSA key pair, writing the private and public keys to files.

USAGE
  $ cryppo genkeypair

OPTIONS
  -P, --publicKeyOut=publicKeyOut    (required) Public key output path
  -b, --bits=bits                    [default: 4096] RSA key size
  -p, --privateKeyOut=privateKeyOut  (required) Private key output path

EXAMPLE
  cryppo genkeypair -p private.pem -P public.pem

See code: src/commands/genkeypair.ts

cryppo help [COMMAND]

display help for cryppo

display help for <%= config.bin %>

USAGE
  $ cryppo help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

cryppo sign FILE DESTINATION

Sign a file with an RSA private key and write the signed contents to a new file

Sign a file with an RSA private key and write the signed contents to a new file

USAGE
  $ cryppo sign FILE DESTINATION

ARGUMENTS
  FILE         File to sign
  DESTINATION  file to write the resulting signed content to

OPTIONS
  -p, --privateKeyFile=privateKeyFile  (required) path to the private key file

EXAMPLE
  cryppo sign -p private.pem my_file.txt my_file.signed.txt

See code: src/commands/sign.ts

cryppo verify FILE DESTINATION

Verify an RSA signed file and write the contents to another file.

Verify an RSA signed file and write the contents to another file.

USAGE
  $ cryppo verify FILE DESTINATION

ARGUMENTS
  FILE         Signed file contents to verify
  DESTINATION  File to write the resulting verified content to

OPTIONS
  -P, --publicKeyFile=publicKeyFile  (required) path to the public key file

EXAMPLE
  cryppo verify -P public.pem my_file.signed.txt my_file.txt

See code: src/commands/verify.ts

cryppo-cli's People

Contributors

zbarbuto avatar joshbax189 avatar leikind avatar vijayshiyani 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.