Cakephp 未定义的方法Cake\Utility\Security::cipher()

Cakephp 未定义的方法Cake\Utility\Security::cipher(),cakephp,encryption,Cakephp,Encryption,我正在尝试创建用户管理模式。我正在使用这个代码 $encryptKey = 'ab12333way2code'; $secret = Security::cipher('StringToEncrypt', $encryptKey); 但它显示了以下致命错误 该方法已在CakePHP 3.0中删除 Security::cipher()已被删除。它是不安全的,并且促进了糟糕的加密实践。您应该改为使用Security::encrypt() 该方法已在CakePHP 3.0中删

我正在尝试创建用户管理模式。我正在使用这个代码

      $encryptKey = 'ab12333way2code';
      $secret = Security::cipher('StringToEncrypt', $encryptKey);
但它显示了以下致命错误


该方法已在CakePHP 3.0中删除

Security::cipher()已被删除。它是不安全的,并且促进了糟糕的加密实践。您应该改为使用Security::encrypt()


该方法已在CakePHP 3.0中删除

Security::cipher()已被删除。它是不安全的,并且促进了糟糕的加密实践。您应该改为使用Security::encrypt()