Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 1.2 KB

encrypt-decrypt.md

File metadata and controls

60 lines (50 loc) · 1.2 KB

Encrypt and decrypt

Available ciphers

For the list of available ciphers, see article List assets.

Encrypt and decrypt

You can encrypt using the encrypt command:

encrypt <cipher> <text>
decrypt <cipher> <text>

For example:

encrypt morse "hello world"
decrypt morse ".... . .-.. .-.. ---  .-- --- .-. .-.. -.."

Keyed ciphers

Encryption key can be specified with the -k parameter:

encrypt <cipher> -k <key> <text>
decrypt <cipher> -k <key> <text>

For example:

decrypt shift -k 13 "uryyb jbeyq"
encrypt shift -k 13 "hello world"

Options

Alphabet

Some ciphers support a customization of the alphabet:

encrypt A1Z26 "hello world" --alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Encoding

Some ciphers support a customization of the encoding:

encrypt hex "hello world" --encoding US-ASCII

Verbosity level

By default, the output simply contains the raw result of the operation. If you would like to display detailed output, add the --detailed flag:

Cipher: ShiftCipher
Key: 13
Ciphertext: uryyb jbeyq
HEX: 7572797962206A62657971

Help

Display documentation and help:

encrypt --help
decrypt --help