@param int $input

@return string The OTP at the specified input
497995
protected function generateOTP(int $input): string
    {
        $hash = hash_hmac($this->getDigest(), $this->intToByteString($input), $this->getDecodedSecret());
        $hmac = [];
        foreach (str_split($hash, 2) as $hex) {
            $hmac[] = hexdec($hex);
        }
        $offset = $hmac[count($hmac) - 1] & 0xF;
        $code = ($hmac[$offset + 0] & 0x7F) << 24 | ($hmac[$offset + 1] & 0xFF) << 16 | ($hmac[$offset + 2] & 0xFF) << 8 | ($hmac[$offset + 3] & 0xFF);
        $otp = $code % pow(10, $this->getDigits());

        return str_pad((string) $otp, $this->getDigits(), '0', STR_PAD_LEFT);
    }
525993
public static function toUnderscorePath($input)
	{
	    $input = self::fromCamelCase($input, false);
	    $input = str_replace('\\', '/', $input);
	    $input = explode('/', $input);
	    $input = array_map(function ($v) {return str_replace(' ', '_', $v);}, $input);
	    $input = strtolower(implode('/', $input));
	    return $input;
	}
1109229
public function verifySalt($input)
    {
        $appearsValid = (1 === preg_match('/^_[\.\/0-9A-Za-z]{8}$/', $input));
        if ($appearsValid) {
            $costFactor = $this->_decodeInt24(substr($input, 1, 4));
            if ($costFactor < 1 || $costFactor > (1 << 24) - 1) {
                $appearsValid = false;
            }
        }

        return $appearsValid;
    }
1185663
public function canonicalize($input)
    {
        $filtered = preg_replace('/\D+/', '', $input) ?? '';
        if (strlen($filtered) !== $this->digitLength) {
            return $input;
        }

        return $filtered;
    }
130984
public function genSalt($input = null)
    {
        if (!$input) {
            $input = $this->_getRandomBytes(3);
        }

        // Hash identifier
        $identifier = '_';

        // Cost factor - must be between 1 and 16777215
        $costFactor = min(max($this->_iterationCount, 1), 0xffffff);
        // Should be odd to avoid revealing weak DES keys
        if (($costFactor % 2) == 0) {
            --$costFactor;
        }

        // Salt string
        $salt = $this->_encode64($input, 3);

        // _CCCCSSSS
        return $identifier . $this->_encodeInt24($costFactor) . $salt;
    }
1234990
public static function describeType($input)
    {
        switch (gettype($input)) {
            case 'object':
                return 'object(' . get_class($input) . ')';
            case 'array':
                return 'array(' . count($input) . ')';
            default:
                ob_start();
                var_dump($input);
                // normalize float vs double
                return str_replace('double(', 'float(', rtrim(ob_get_clean()));
        }
    }
365174
public function htmlEntities( string$input ):string
	{
		return htmlentities($input,$this->htsl->getConfig('ENT_flags',$this->docType),$this->htsl->getConfig('charset'),false);
	}
1245929
public function sanitize(string $input) : string
    {
        $input = $this->_connection->getConnection()->quote($input);

        return substr($input, 1, -1);
    }
1226462
protected function getTransformedInput($input)
	{
		$transformed = new Fluent($input);

		foreach ($this->transformInput(new Fluent($input)) as $k => $v) {
			if (array_key_exists($k, $input)) {
				if ($v instanceof \Closure) {
					$transformed[$k] = $v($input[$k]);
				} else {
					$transformed[$k] = $v;
				}
			}
		}

		return $transformed;
	}
241093
public function input($input) {
        if(isset($this->inputs->$input)) 
            return $this->inputs->$input;
        return null;
    }
956876
protected static function normalizeCheckBoxAndRadio($input)
    {
        $parts = preg_split("/(<.*?>)/", $input, 2, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
        if (isset($parts[1])) {
            return $parts;
        } else {
            return array('', $parts[0]);
        }
    }
854563
public static function convert(string $input, int $to) : string
    {
        $string = self::normalize($input);
        $parts = explode(' ', $string);
        array_walk($parts, function (&$part) {
            $part = ucfirst($part);
        });
        switch ($to) {
            case self::TYPE_NAMESPACE:
                return implode('\\', $parts);
            case self::TYPE_TABLE:
                return strtolower(implode('_', $parts));
            case self::TYPE_VARIABLE:
            case self::TYPE_ANGULAR_COMPONENT:
                return lcfirst(implode('', $parts));
            case self::TYPE_PATH:
                return implode('/', $parts);
            case self::TYPE_URL:
                return strtolower(implode('/', $parts));
            case self::TYPE_CSS_IDENTIFIER:
            case self::TYPE_ANGULAR_TAG:
                return strtolower(implode('-', $parts));
            case self::TYPE_ANGULAR_MODULE:
                return strtolower(implode('.', $parts));
            default:
                throw new DomainException("Please use one of the `TYPE_` constants on the `Codger\Generate\Language` class as 2nd parameter.");
        }
    }
761282
protected function _uudecode($input)
    {
        $decoded = '';

        foreach (explode("\n", $input) as $line) {
            $c = count($bytes = unpack('c*', substr(trim($line,"\r\n\t"), 1)));

            while ($c % 4) {
                $bytes[++$c] = 0;
            }

            foreach (array_chunk($bytes, 4) as $b) {
                $b0 = ($b[0] == 0x60) ? 0 : $b[0] - 0x20;
                $b1 = ($b[1] == 0x60) ? 0 : $b[1] - 0x20;
                $b2 = ($b[2] == 0x60) ? 0 : $b[2] - 0x20;
                $b3 = ($b[3] == 0x60) ? 0 : $b[3] - 0x20;

                $b0 <<= 2;
                $b0 |= ($b1 >> 4) & 0x03;
                $b1 <<= 4;
                $b1 |= ($b2 >> 2) & 0x0F;
                $b2 <<= 6;
                $b2 |= $b3 & 0x3F;

                $decoded .= pack('c*', $b0, $b1, $b2);
            }
        }

        return rtrim($decoded, "\0");
    }
835327
private function filterEmptyInput($input)
    {
        foreach ($input as $key => $value)
        {
            if (empty($value))
            {
                unset($input[$key]);
            }
        }

        return $input;
    }
406218
protected function resolve(Input $input): Input
    {
        $this->call($input->value());
        $input->ignore();

        return $input;
    }
1199002
protected function decodeHeader($input)
    {
        //Sometimes we have 2 label From so we take only the first
        if (is_array($input)) {
            return $this->decodeSingleHeader($input[0]);
        }

        return $this->decodeSingleHeader($input);
    }
198675
public static function readMessage($input)
    {
        $line = fgets($input);
        $values = explode(':', $line);
        if (count($values) !== 2 || trim($values[0]) !== self::CONTENT_LENGTH) {
            return null;
        }
        $length = intval(trim($values[1]));

        // read one empty line.
        while (trim(fgets($input)) !== '') {}

        $json = fread($input, $length);
        return Common::decode($json);
    }