Skip to content

xitonix/xv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xv

A CLI tool to encrypt & decrypt data using AES-256 algorithm with command piping support.

Installation

go get -u github.com/xitonix/xv

OR

Download the binary from the release page.

OR

Clone the repo and run install.sh

  • If GOBIN is not set, the tool will be installed in /usr/local/bin

Usage

Setup key file (Optional)

xv init # Key MUST be at least 32 characters. A random key will be generated if not specified

Examples

Encryption using the key file

xv [enc] "plain text"
echo "plain text" | xv [enc]
xv [enc] "plain text"
xv [enc] "plain text" --encoder hex
echo "plain text" | xv [enc]
cat file.txt | xv [enc] > enc.txt
cat file.jpg | xv [enc] -e raw > enc.jpg

Encryption using a key

xv [enc] "plain text" --key "encryption key of at least 32 characters"
echo "plain text" | xv [enc] --key "encryption key of at least 32 characters"

Decryption using the key file

xv dec "Base 64 encoded text of AES-256 encrypted data"
echo "Base 64 encoded text of AES-256 encrypted data" | xv dec

echo "Hex encoded text of AES-256 encrypted data" | xv dec --decoder hex

cat base_64_encoded_encrypted.txt | xv dec > decrypted.txt
cat raw_encrypted.jpg | xv dec -d raw > decrypted.jpg

Decryption using a key

xv dec "Base 64 encoded text of AES-256 encrypted data" --key "encryption key of at least 32 characters"
echo "Base 64 encoded text of AES-256 encrypted data" | xv dec --key "encryption key of at least 32 characters"

Notes

  • enc command will be executed by default if not set explicitly.
  • If encoder/decoder is not specified explicitly, base 64 will be selected by default.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published