ParagonIE_Sodium_Core_Util::intArrayToString

Advertisement

Summery Summery

Turn an array of integers into a string

Syntax Syntax

ParagonIE_Sodium_Core_Util::intArrayToString( $ints )

Parameters Parameters

(<span class="arrayarray<int,) (Required) int> $ints

Return Return

(string)

Source Source

File: wp-includes/sodium_compat/src/Core/Util.php

    public static function intArrayToString(array $ints)
    {
        /** @var array<int, int> $args */
        $args = $ints;
        foreach ($args as $i => $v) {
            $args[$i] = (int) ($v & 0xff);
        }
        array_unshift($args, str_repeat('C', count($ints)));
        return (string) (call_user_func_array('pack', $args));
    }

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.