ParagonIE_Sodium_Core_Util::store_4() public WP 1.0
Store a 32-bit integer into a string, treating it as big-endian.
{} It's a method of the class: ParagonIE_Sodium_Core_Util{}
No Hooks.
Return
String
. Null. Nothing.
Usage
$result = ParagonIE_Sodium_Core_Util::store_4( $int );
- $int(int) (required)
- -
Code of ParagonIE_Sodium_Core_Util::store_4() ParagonIE Sodium Core Util::store 4 WP 5.7.1
public static function store_4($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('N', $int);
return $packed;
}