Command line tool to encrypt or decrypt a string

CryptoString will generate 256 bit random salt and IV values each time.

Since salt and IV must be the same between the encryption and decryption of a given string, the salt and IV is prepended to the cipher text upon encryption and extracted from it again in order to perform the decryption.
 
The result of this is that encrypting the exact same plaintext with the exact same password gives an entirely different ciphertext result each time.
 

Switches

-e for encryption

-d for decryption

 

Arguments

-string holds the string to en-/decrypt

-secret holds the secret pass phrase

 

Examples

CryptoString -e -string "Hello World" -secret "1234"
CryptoString -secret "1234" -string "Hello World" -e
CryptoString -string "my dirty secret" -e -secret MyP@ssw0rd

CryptoString -d -string "617VwXLW3Jkayl67XJNji62WD..." -secret "1234"
CryptoString -secret "1234" -string 617VwXLW3Jkayl67XJNji62WD... -d
CryptoString -string oXkzm0w6TU2ryG0nIsmC1M5/Cs... -d -secret "my secret"

 

Redirect to File

You can redirect the output of the encrypted/decrypted string to a file via the >> command line redirection.  If the file exists the output of CryptoString will be added to the file content, otherwise the file will be created.
 
CryptoString -e -string "Hello World" -secret "1234" >>C:\encrypted.txt

download now