protected function parseSection($hex, array $sections, $octet = false)
    {
        $parsedString = '';

        foreach ($sections as $section) {
            $start = $octet ? $section : $section[0];

            $length = $octet ? 2 : $section[1];

            $parsedString .= substr($hex, $start, $length);
        }

        return $parsedString;
    }
protected function parseSection($hex, array $sections, $octet = false)
    {
        $parsedString = '';

        foreach ($sections as $section) {
            $start = $octet ? $section : $section[0];

            $length = $octet ? 2 : $section[1];

            $parsedString .= substr($hex, $start, $length);
        }

        return $parsedString;
    }
protected function parseSection ( $ hex , array $ sections , $ octet = false ) { $ parsedString = '' ; foreach ( $ sections as $ section ) { $ start = $ octet ? $ section : $ section [ 0 ] ; $ length = $ octet ? 2 : $ section [ 1 ] ; $ parsedString .= substr ( $ hex , $ start , $ length ) ; } return $ parsedString ; }
Return the specified section of the hexadecimal string.

@author Chad Sikorra <Chad.Sikorra@gmail.com>
@link https://github.com/ldaptools/ldaptools

@param string $hex      The full hex string.
@param array  $sections An array of start and length (unless octet is true, then length is always 2).
@param bool   $octet    Whether this is for octet string form.

@return string The concatenated sections in upper-case.
Return the specified section of the hexadecimal string .