ParagonIE_Sodium_Core_ChaCha20::rotate

Advertisement

Summery Summery

Bitwise left rotation

Syntax Syntax

ParagonIE_Sodium_Core_ChaCha20::rotate( int $v, int $n )

Parameters Parameters

$v

(Required)

$n

(Required)

Return Return

(int)

Source Source

File: wp-includes/sodium_compat/src/Core/ChaCha20.php

    public static function rotate($v, $n)
    {
        $v &= 0xffffffff;
        $n &= 31;
        return (int) (
            0xffffffff & (
                ($v << $n)
                    |
                ($v >> (32 - $n))
            )
        );
    }

Advertisement

Advertisement

Leave a Reply