douping1993
2015-08-06 17:41 浏览 30
已采纳

如何解密cakephp 3 cookie

Assume that you have a cookie string like this:

Q2FrZQ==.AAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCDDDDDDDDDDDDD

How can you decrypt this in cakephp 3 by using AES ?

It seems like Cake\Utility\Security::decrypt($cipher, $key, $hmacSalt = null) does it:

http://book.cakephp.org/3.0/en/core-libraries/security.html#Cake\Utility\Security::decrypt

But what about the parameters ? hmacSalt is application's salt value, but what's the key value in second argument ?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答 默认 最新

相关推荐