WordPress at a glance
function is not described

ParagonIE_Sodium_Core32_Int32::rotateRight() public WP 1.0

Rotate to the right

{} It's a method of the class: ParagonIE_Sodium_Core32_Int32{}

No Hooks.

Return

ParagonIE_Sodium_Core32_Int32. Null. Nothing.

Usage

$ParagonIE_Sodium_Core32_Int32 = new ParagonIE_Sodium_Core32_Int32();
$ParagonIE_Sodium_Core32_Int32->rotateRight( $c );
$c(int)
-

Code of ParagonIE_Sodium_Core32_Int32::rotateRight() WP 5.7

<?php
public function rotateRight($c = 0)
{
    ParagonIE_Sodium_Core32_Util::declareScalarType($c, 'int', 1);
    /** @var int $c */
    $c = (int) $c;

    $return = new ParagonIE_Sodium_Core32_Int32();
    $return->unsignedInt = $this->unsignedInt;
    $c &= 31;
    /** @var int $c */
    if ($c === 0) {
        // NOP, but we want a copy.
        $return->limbs = $this->limbs;
    } else {
        /** @var int $c */

        /** @var int $idx_shift */
        $idx_shift = ($c >> 4) & 1;

        /** @var int $sub_shift */
        $sub_shift = $c & 15;

        /** @var array<int, int> $limbs */
        $limbs =& $return->limbs;

        /** @var array<int, int> $myLimbs */
        $myLimbs =& $this->limbs;

        for ($i = 1; $i >= 0; --$i) {
            /** @var int $j */
            $j = ($i - $idx_shift) & 1;
            /** @var int $k */
            $k = ($i - $idx_shift - 1) & 1;
            $limbs[$i] = (int) (
                (
                    ((int) ($myLimbs[$j]) >> (int) ($sub_shift))
                        |
                    ((int) ($myLimbs[$k]) << (16 - (int) ($sub_shift)))
                ) & 0xffff
            );
        }
    }
    return $return;
}