Request Quote

Admin configuration password encryption and decryption in magento

In this article you will see Admin configuration password encryption and decryption in magento.


Encryption can be done either by ‘password‘ or ‘obscure‘. In password the text will simply be encrypted and in inspect element of browser its value can be seen. But by using obscure only encrypted value can be seen.

Use the following code to encrypt –

<systemconfig translate="label">
    <label>Encrypt with obscure</label>

Now input value in the text box and saving will encrypt the value.

To use obscure in magento 2, click here


decrypt() to read the encrypted value.

$encrypted_value = Mage::getStoreConfig('section/tab/systemconfig');
echo decrypt($encrypted_value);

section and tab are section name and tab name respectively.

This displays the decrypted value.

Happy coding 🙂

. . .


Add Your Comment

Be the first to comment.