public static function decodeHexToByteStr($encodedStr, $allowOmittedPadding = false) {
        // Check input string.
        $pattern = '/[0-9A-V]*([0-9A-V]={0,6})?/';
        self::_checkEncodedString($encodedStr, $pattern);

        // Get length (byte count) of encoded string.
        $encodedStrLen = self::_byteCount($encodedStr);

        // Get decoded byte-string.
        $byteStr = self::_decodeToByteStr($encodedStr, $encodedStrLen, self::$_hexFlippedAlphabet, '=', $allowOmittedPadding);

        // Return byte-string.
        return $byteStr;
    }
public static function decodeHexToByteStr($encodedStr, $allowOmittedPadding = false) {
        // Check input string.
        $pattern = '/[0-9A-V]*([0-9A-V]={0,6})?/';
        self::_checkEncodedString($encodedStr, $pattern);

        // Get length (byte count) of encoded string.
        $encodedStrLen = self::_byteCount($encodedStr);

        // Get decoded byte-string.
        $byteStr = self::_decodeToByteStr($encodedStr, $encodedStrLen, self::$_hexFlippedAlphabet, '=', $allowOmittedPadding);

        // Return byte-string.
        return $byteStr;
    }
public static function decodeHexToByteStr ( $ encodedStr , $ allowOmittedPadding = false ) { // Check input string. $ pattern = '/[0-9A-V]*([0-9A-V]={0,6})?/' ; self :: _checkEncodedString ( $ encodedStr , $ pattern ) ; // Get length (byte count) of encoded string. $ encodedStrLen = self :: _byteCount ( $ encodedStr ) ; // Get decoded byte-string. $ byteStr = self :: _decodeToByteStr ( $ encodedStr , $ encodedStrLen , self :: $ _hexFlippedAlphabet , '=' , $ allowOmittedPadding ) ; // Return byte-string. return $ byteStr ; }
Decodes a RFC 4646 base32 extended hex encoded string to a byte-string.

Expects an encoded string according to the base 32 extended hex encoding
described in RFC 4648 p. 10 (http://tools.ietf.org/html/rfc4648#page-10).
Throws an exception if the encoded string is malformed.

@param string $encodedStr The encoded string.
@param bool $allowOmittedPadding If true, missing padding characters at
the end of the encoded string will not lead to an exception.
Defaults to false.
@return string The decoded byte-string.
Decodes a RFC 4646 base32 extended hex encoded string to a byte - string .