function _decodeLength(&$string)
    {
        $length = ord($this->_string_shift($string));
        if ($length & 0x80) { // definite length, long form
            $length&= 0x7F;
            $temp = $this->_string_shift($string, $length);
            list(, $length) = unpack('N', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4));
        }
        return $length;
    }
function _decodeLength(&$string)
    {
        $length = ord($this->_string_shift($string));
        if ($length & 0x80) { // definite length, long form
            $length&= 0x7F;
            $temp = $this->_string_shift($string, $length);
            list(, $length) = unpack('N', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4));
        }
        return $length;
    }
function _decodeLength ( & $ string ) { $ length = ord ( $ this -> _string_shift ( $ string ) ) ; if ( $ length & 0x80 ) { // definite length, long form
 $ length &= 0x7F ; $ temp = $ this -> _string_shift ( $ string , $ length ) ; list ( , $ length ) = unpack ( 'N' , substr ( str_pad ( $ temp , 4 , chr ( 0 ) , STR_PAD_LEFT ) , - 4 ) ) ; } return $ length ; }
DER-decode the length

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.

@access private
@param string $string
@return int
DER - decode the length