You are here

public static function ParagonIE_Sodium_Core32_Int32::fromInt in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/Core32/Int32.php \ParagonIE_Sodium_Core32_Int32::fromInt()

Parameters

int $signed:

Return value

self

Throws

SodiumException

TypeError

9 calls to ParagonIE_Sodium_Core32_Int32::fromInt()
ParagonIE_Sodium_Core32_Curve25519::fe_1 in vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
Get a field element of size 10 with a value of 1
ParagonIE_Sodium_Core32_Curve25519::fe_frombytes in vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
Give: 32-byte string. Receive: A field element object to use for internal calculations.
ParagonIE_Sodium_Core32_Curve25519::ge_double_scalarmult_vartime in vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
@internal You should not use this directly from another application
ParagonIE_Sodium_Core32_Curve25519::ge_frombytes_negate_vartime in vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
@internal You should not use this directly from another application
ParagonIE_Sodium_Core32_Curve25519::ge_p3_to_cached in vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
@internal You should not use this directly from another application

... See full list

File

vendor/paragonie/sodium_compat/src/Core32/Int32.php, line 719

Class

ParagonIE_Sodium_Core32_Int32
Class ParagonIE_Sodium_Core32_Int32

Code

public static function fromInt($signed) {
  ParagonIE_Sodium_Core32_Util::declareScalarType($signed, 'int', 1);

  /** @var int $signed */
  $signed = (int) $signed;
  return new ParagonIE_Sodium_Core32_Int32(array(
    (int) ($signed >> 16 & 0xffff),
    (int) ($signed & 0xffff),
  ));
}