You are here

public static function ParagonIE_Sodium_Core_BLAKE2b::SplFixedArrayToString in Automatic Updates 7

Same name and namespace in other branches
  1. 8 vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php \ParagonIE_Sodium_Core_BLAKE2b::SplFixedArrayToString()

Convert an SplFixedArray of integers into a string

@internal You should not use this directly from another application

Parameters

SplFixedArray $a:

Return value

string

Throws

TypeError

1 call to ParagonIE_Sodium_Core_BLAKE2b::SplFixedArrayToString()
ParagonIE_Sodium_Core_BLAKE2b::contextToString in vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php
@internal You should not use this directly from another application

File

vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php, line 663

Class

ParagonIE_Sodium_Core_BLAKE2b
Class ParagonIE_Sodium_Core_BLAKE2b

Code

public static function SplFixedArrayToString(SplFixedArray $a) {

  /**
   * @var array<int, int|string> $arr
   */
  $arr = $a
    ->toArray();
  $c = $a
    ->count();
  array_unshift($arr, str_repeat('C', $c));
  return (string) call_user_func_array('pack', $arr);
}