You are here

public static function ParagonIE_Sodium_Core32_Int64::fromInt in Automatic Updates 7

Same name and namespace in other branches
  1. 8 vendor/paragonie/sodium_compat/src/Core32/Int64.php \ParagonIE_Sodium_Core32_Int64::fromInt()

Parameters

int $low:

Return value

self

Throws

SodiumException

TypeError

3 calls to ParagonIE_Sodium_Core32_Int64::fromInt()
ParagonIE_Sodium_Compat::runtime_speed_test in vendor/paragonie/sodium_compat/src/Compat.php
Runtime testing method for 32-bit platforms.
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

File

vendor/paragonie/sodium_compat/src/Core32/Int64.php, line 890

Class

ParagonIE_Sodium_Core32_Int64
Class ParagonIE_Sodium_Core32_Int64

Code

public static function fromInt($low) {
  ParagonIE_Sodium_Core32_Util::declareScalarType($low, 'int', 1);
  $low = (int) $low;
  return new ParagonIE_Sodium_Core32_Int64(array(
    0,
    0,
    (int) ($low >> 16 & 0xffff),
    (int) ($low & 0xffff),
  ));
}