Skip to content

fdjkgh580/jsnlib-des

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsnlib-des

實現 DES 加密方式,如

  • ECB DES-ECB、DES-EDE3
  • CBC DES-CBC、DES-EDE3-CBC、DESX-CBC
  • CFB DES-CFB8、DES-EDE3-CFB8
  • CTR
  • OFB

#範例

use Jsnlib\DES;

$des = new DES('key123456', 'DES-ECB', DES::OUTPUT_BASE64);
$data = [
    'id' => 'A123456',
    'name' => 'Cary',
    'expired' => '2099-01-01'
];
$encrypt = $des->encrypt(json_encode($data));
$descrypt = $des->decrypt($encrypt);

About

實現 DES 加密方式

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages