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;
    }