What is correct method to encrypt and decrypt data in magento 2?
<p>I am creating <strong>magento 2</strong> custom module, where I am getting some data using API call. I need to store that data in my custom table. Before storage I need to encrypt that data. I think there is default encrypt function for that. I have used <code>Mage::helper('Mage_Core_Helper_Data')-&gt;encrypt($value)</code>. But no success.</p>