/** * @param \cookyii\modules\Account\resources\Account $Account * @return array */ private function decryptData($Account) { if (empty($this->hash)) { throw new \yii\base\InvalidParamException('Empty hash.'); } $data = Security()->decryptByKey(base64_decode($this->hash), $Account->getEncryptKey()); if (empty($data)) { throw new \yii\base\InvalidParamException('Invalid hash.'); } return Json::decode($data); }