Yii2 encrypt decrypt data
Yii2 have inbuilt functions for encrypt/decrypt data using secret key. You need secret key to decrypt the data. So if the person have secret key he/she will be decrypt the data easily using the getSecurity() method. Below example is showing the data encrypt/decrypt:
$data = 'FORM DATA'; $secretKey = 'YOUR SECRET KEY' $encryptData = Yii::$app->getSecurity()->encryptByPassword($data, $secretKey); $data = Yii::$app->getSecurity()->decryptByPassword($encryptData, $secretKey);
ReplyDeleteNice Blog , This is what I exactly Looking for , Keep sharing more blog .
Hire Yii Developers in India