You are here

public static function ParagonIE_Sodium_Core_Util::store32_le 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::store32_le()

Store a 32-bit integer into a string, treating it as little-endian.

@internal You should not use this directly from another application

Parameters

int $int:

Return value

string

Throws

TypeError

8 calls to ParagonIE_Sodium_Core_Util::store32_le()
ParagonIE_Sodium_Core_BLAKE2b::contextToString in vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php
@internal You should not use this directly from another application
ParagonIE_Sodium_Core_ChaCha20::encryptBytes in vendor/paragonie/sodium_compat/src/Core/ChaCha20.php
@internal You should not use this directly from another application
ParagonIE_Sodium_Core_HChaCha20::hChaCha20Bytes in vendor/paragonie/sodium_compat/src/Core/HChaCha20.php
ParagonIE_Sodium_Core_HSalsa20::hsalsa20 in vendor/paragonie/sodium_compat/src/Core/HSalsa20.php
Calculate an hsalsa20 hash of a single block
ParagonIE_Sodium_Core_Poly1305_State::finish in vendor/paragonie/sodium_compat/src/Core/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 646

Class

ParagonIE_Sodium_Core_Util
Class ParagonIE_Sodium_Core_Util

Code

public static function store32_le($int) {

  /* Type checks: */
  if (!is_int($int)) {
    if (is_numeric($int)) {
      $int = (int) $int;
    }
    else {
      throw new TypeError('Argument 1 must be an integer, ' . gettype($int) . ' given.');
    }
  }

  /** @var string $packed */
  $packed = pack('V', $int);
  return $packed;
}