PHP Class phpseclib\Common\Functions\ASN1

Author: Jim Wigginton ([email protected])
显示文件 Open project: phpseclib/phpseclib Class Usage Examples

Public Methods

Method Description
decodeLength ( string &$string ) : integer DER-decode the length
encodeLength ( integer $length ) : string DER-encode the length

Method Details

decodeLength() static public method

DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information.
static public decodeLength ( string &$string ) : integer
$string string
return integer

encodeLength() static public method

DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information.
static public encodeLength ( integer $length ) : string
$length integer
return string