Openssl

Openssl类封装好了Openssl加密解密方法,示例:

  1. <?php
  2. $openssl = new \EasySwoole\Component\Openssl('key','DES-EDE3');
  3. $msg = $openssl->encrypt('仙士可');
  4. var_dump($msg);
  5. $msg = $openssl->decrypt($msg);
  6. var_dump($msg);

输出:

  1. string(24) "Lgx3rlBCPcX+Ke+Whau87g=="
  2. string(9) "仙士可"