\Think\Crypt\DriverDes

Des 加密实现类 Converted from JavaScript to PHP by Jim Gibbs, June 2004 Paul Tero, July 2001 Optimised for performance with large blocks by Michael Hayworth, November 2001 http://www.netdealing.com

Summary

Methods
Properties
Constants
encrypt()
decrypt()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_des()
_createKeys()
No private properties found
N/A

Methods

encrypt()

encrypt(string  $str, string  $key, integer  $expire) : string

加密字符串

Parameters

string $str

字符串

string $key

加密key

integer $expire

有效期(秒)

Returns

string

decrypt()

decrypt(string  $str, string  $key) : string

解密字符串

Parameters

string $str

字符串

string $key

加密key

Returns

string

_des()

_des(string  $key,   $message,   $encrypt,   $mode,   $iv = null) : string

Des算法

Parameters

string $key

加密key

$message
$encrypt
$mode
$iv

Returns

string

_createKeys()

_createKeys(string  $key) : string

createKeys this takes as input a 64 bit key (even though only 56 bits are used) as an array of 2 integers, and returns 16 48 bit keys

Parameters

string $key

加密key

Returns

string