Skip to content

Instantly share code, notes, and snippets.

@JohnZavyn
Created May 14, 2018 18:56
Show Gist options
  • Save JohnZavyn/271f1ea736e582927e0d3b4d683ea134 to your computer and use it in GitHub Desktop.
Save JohnZavyn/271f1ea736e582927e0d3b4d683ea134 to your computer and use it in GitHub Desktop.
require 'my_sql_encryption'
text = 'Sensitive data'
encrypted = MySQLEncryption.mysql_encrypt(text, @password)
decrypted = MySQLEncryption.mysql_decrypt(encrypted, @password)
log.info("Encrypted: #{encrypted}")
log.info("Decrypted: #{decrypted}")
expect(decrypted).to eq(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment