For HT
# String, rounds of "encryption"
go run encrypt.go secret 3
# String, rounds of "encryption"
./encrypt.py secret 3
# String, rounds of "encryption"
./encrypt.sh secret 3
# First, compile the class because this is fucking Java
$ javac Encrypt.java
# String, rounds of "encryption"
$ java Encrypt secret 3
# String, rounds of "encryption"
node ./encrypt.js secret 3
# First, compile the jar because this is like fucking Java
$ kotlinc encrypt.kt -include-runtime -d encrypt.jar
# String, rounds of "encryption"
$ java -jar encrypt.jar secret 3
# String, rounds of "encryption"
./encrypt.pl secret 3
# String, rounds of "encryption"
./encrypt.rb secret 3
# First, compile the class because this is like fucking Java
$ scalac Encrypt.scala
# String, rounds of "encryption"
$ scala Encrypt secret 3
# String, rounds of "encryption"
./encrypt.tcl secret 3
Interactively
$ terraform init && terraform apply -auto-approve
var.input
Enter a value: secret
var.times
Enter a value: 3
null_resource.encrypt: Creating...
null_resource.encrypt: Provisioning with 'local-exec'...
null_resource.encrypt (local-exec): Executing: ["/bin/sh" "-c" "./encrypt.py secret 3"]
null_resource.encrypt (local-exec): "encrypted" WXpKV2FtTnRWakE9
null_resource.encrypt (local-exec): "decrypted" secret
null_resource.encrypt: Creation complete after 0s [id=2042342408304500010]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Supply values on the CLI
$ terraform apply -var input=secret -var times=3 -auto-approve
null_resource.encrypt: Creating...
null_resource.encrypt: Provisioning with 'local-exec'...
null_resource.encrypt (local-exec): Executing: ["/bin/sh" "-c" "./encrypt.py secret 3"]
null_resource.encrypt (local-exec): "encrypted" WXpKV2FtTnRWakE9
null_resource.encrypt (local-exec): "decrypted" secret
null_resource.encrypt: Creation complete after 0s [id=8726143734733607353]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Use a tfvars
file
Sample terraform.tfvars
input="secret"
times=1
# Only run if it exists
$ test -f terraform.tfvars && terraform apply -auto-approve
null_resource.encrypt: Creating...
null_resource.encrypt: Provisioning with 'local-exec'...
null_resource.encrypt (local-exec): Executing: ["/bin/sh" "-c" "./encrypt.py secret 3"]
null_resource.encrypt (local-exec): "encrypted" WXpKV2FtTnRWakE9
null_resource.encrypt (local-exec): "decrypted" secret
null_resource.encrypt: Creation complete after 0s [id=3935885297718964381]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
ansible-playbook ./encrypt.yaml
# String, rounds of "encryption"
./encrypt.php secret 3
puppet apply ./encrypt.pp
cd rust
cargo run secret 3
# String, rounds of "encryption"
~/dev/l33tcrypto/l33tcrypto>lein run secret 3
# String, rounds of "encryption"
./encrypt.ps1 secret 3
# First, compile the thing because what even is Erlang
$ erl -compile encrypt.erl
# Arguments to -encrypt are String, rounds of "encryption"
$ erl -noshell -s encrypt encrypt -encrypt "secret" 3