ChatAES.php 316 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * 聊天对称性加密
  4. * User: ben
  5. * Date: 2018/9/19
  6. * Time: 下午2:59
  7. */
  8. class ChatAES extends AES {
  9. public function __construct($key = null) {
  10. $key = $key ?: AES_KEY;
  11. $iv = 'mee.chat';
  12. $method = 'aes-256-ctr';
  13. parent::__construct($key, $iv, $method);
  14. }
  15. }