Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mathewjosephh/47646ed3733e2f0776f9e44c8ea36668 to your computer and use it in GitHub Desktop.
Save mathewjosephh/47646ed3733e2f0776f9e44c8ea36668 to your computer and use it in GitHub Desktop.
Encrypt and decrypt information in Magento. By default, Magento uses MCrypt–Blowfish in ECB-Mode to encrypt Data, initialized with the security key you defined when you installed Magento.
<?php
$encrypted_data = Mage::helper('core')->encrypt('my secret value');
$plain_data = Mage::helper('core')->decrypt($encrypted_data);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment