You are here

public static function ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray 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::stringToSplFixedArray()

Convert a string into an SplFixedArray of integers

@internal You should not use this directly from another application

Parameters

string $str:

Return value

SplFixedArray

5 calls to ParagonIE_Sodium_Core_BLAKE2b::stringToSplFixedArray()
ParagonIE_Sodium_Core_BLAKE2b::stringToContext in vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php
Creates an SplFixedArray containing other SplFixedArray elements, from a string (compatible with \Sodium\crypto_generichash_{init, update, final})
ParagonIE_Sodium_Crypto::generichash in vendor/paragonie/sodium_compat/src/Crypto.php
Calculate a BLAKE2b hash.
ParagonIE_Sodium_Crypto::generichash_init in vendor/paragonie/sodium_compat/src/Crypto.php
Initialize a hashing context for BLAKE2b.
ParagonIE_Sodium_Crypto::generichash_init_salt_personal in vendor/paragonie/sodium_compat/src/Crypto.php
Initialize a hashing context for BLAKE2b.
ParagonIE_Sodium_Crypto::generichash_update in vendor/paragonie/sodium_compat/src/Crypto.php
Update a hashing context for BLAKE2b with $message

File

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

Class

ParagonIE_Sodium_Core_BLAKE2b
Class ParagonIE_Sodium_Core_BLAKE2b

Code

public static function stringToSplFixedArray($str = '') {
  $values = unpack('C*', $str);
  return SplFixedArray::fromArray(array_values($values));
}