Meeco Encryption Library CLI
- Download the gzip file appriate for your system from the releases page.
- Unzip the downloaded file to a destination of your choosing.
- Open up a terminal window inside the extracted
cryppo
folder. - Change directory to the
bin
folder. - Test that everything is working correctly by running the command
./cryppo genkey
. - 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) - 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.
$ 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
...
cryppo decrypt
cryppo encrypt
cryppo genkey
cryppo genkeypair
cryppo help [COMMAND]
cryppo sign FILE DESTINATION
cryppo verify FILE DESTINATION
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
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
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
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
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
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
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