Skip to content

Instantly share code, notes, and snippets.

@apeckham
Created July 19, 2023 02:07
Show Gist options
  • Save apeckham/fb2aafc352d07033d915c8915418b078 to your computer and use it in GitHub Desktop.
Save apeckham/fb2aafc352d07033d915c8915418b078 to your computer and use it in GitHub Desktop.
decrypt credentials.yml.enc, etc, on stdin
echo 'your_encrypted_data' | ruby -ractive_support -ractive_support/message_encryptor -e "puts ActiveSupport::MessageEncryptor.new([ENV['DECRYPTION_KEY']].pack('H*'), cipher: 'aes-256-gcm').decrypt_and_verify(STDIN.read)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment