Common.php 397 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Collection\Lib;
  3. use Dever;
  4. class Common
  5. {
  6. # 加密code
  7. public function encode($code)
  8. {
  9. $key = Dever::config('base', 'project')->encode_key;
  10. return Dever::encode($code, $key);
  11. }
  12. # 解密code
  13. public function decode($code)
  14. {
  15. $key = Dever::config('base', 'project')->encode_key;
  16. return Dever::decode($code, $key);
  17. }
  18. }