There are situations in which you need to verify that your data hasn't been tampered with by a third party or even corrupted in some way. Yii provides an easy way to confirm data integrity in the form of two helper functions.
There are situations in which you need to verify that your data hasn't been tampered with by a third party or even corrupted in some way. Yii provides an easy way to confirm data integrity in the form of two helper functions.
Prefix the data with a hash generated from the secret key and data
Prefix the data with a hash generated from the secret key and data
```php
```php
// $secretKey our application or user secret, $genuineData obtained from a reliable source
// $secretKey our application or user secret, $genuineData obtained from a reliable source