Think/Crypt/Driver/Des.php
public static function encrypt($str, $key, $expire = 0)
    {
        if ("" == $str) {
            return "";
        }
        $expire = sprintf('%010d', $expire ? $expire + time() : 0);
        $str = $expire.$str;

        return self::_des($key, $str, 1);
    }
public static function encrypt($str, $key, $expire = 0)
    {
        if ("" == $str) {
            return "";
        }
        $expire = sprintf('%010d', $expire ? $expire + time() : 0);
        $str = $expire.$str;

        return self::_des($key, $str, 1);
    }
加密字符串
@param string $str 字符串
@param string $key 加密key
@param integer $expire 有效期（秒）
@return string