For the list of available ciphers, see article List assets.
You can encrypt using the encrypt
command:
encrypt <cipher> <text>
decrypt <cipher> <text>
For example:
encrypt morse "hello world"
decrypt morse ".... . .-.. .-.. --- .-- --- .-. .-.. -.."
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"
Some ciphers support a customization of the alphabet:
encrypt A1Z26 "hello world" --alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Some ciphers support a customization of the encoding:
encrypt hex "hello world" --encoding US-ASCII
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
Display documentation and help:
encrypt --help
decrypt --help