You are here

public static function ParagonIE_Sodium_Core_Util::intArrayToString in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/Core/Util.php \ParagonIE_Sodium_Core_Util::intArrayToString()

Turn an array of integers into a string

@internal You should not use this directly from another application

Parameters

array<int, int> $ints:

Return value

string

13 calls to ParagonIE_Sodium_Core_Util::intArrayToString()
ParagonIE_Sodium_Compat::add in vendor/paragonie/sodium_compat/src/Compat.php
Add two numbers (little-endian unsigned), storing the value in the first parameter.
ParagonIE_Sodium_Core32_Curve25519::fe_tobytes in vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
Convert a field element to a byte string.
ParagonIE_Sodium_Core32_Curve25519::sc_muladd in vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
Calculates (ab + c) mod l where l = 2^252 + 27742317777372353535851937790883648493
ParagonIE_Sodium_Core32_Curve25519::sc_reduce in vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
@internal You should not use this directly from another application
ParagonIE_Sodium_Core32_Poly1305_State::finish in vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php
@internal You should not use this directly from another application

... See full list

File

vendor/paragonie/sodium_compat/src/Core/Util.php, line 367

Class

ParagonIE_Sodium_Core_Util
Class ParagonIE_Sodium_Core_Util

Code

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