From a415c29efee45520ae252d2aa28f1083a521cd7b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 09:56:49 +0200 Subject: Adding upstream version 6.4.3+dfsg1. Signed-off-by: Daniel Baumann --- wp-includes/sodium_compat/src/Core/HSalsa20.php | 96 +++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 wp-includes/sodium_compat/src/Core/HSalsa20.php (limited to 'wp-includes/sodium_compat/src/Core/HSalsa20.php') diff --git a/wp-includes/sodium_compat/src/Core/HSalsa20.php b/wp-includes/sodium_compat/src/Core/HSalsa20.php new file mode 100644 index 0000000..35ee79e --- /dev/null +++ b/wp-includes/sodium_compat/src/Core/HSalsa20.php @@ -0,0 +1,96 @@ + 0; $i -= 2) { + $x4 ^= self::rotate($x0 + $x12, 7); + $x8 ^= self::rotate($x4 + $x0, 9); + $x12 ^= self::rotate($x8 + $x4, 13); + $x0 ^= self::rotate($x12 + $x8, 18); + $x9 ^= self::rotate($x5 + $x1, 7); + $x13 ^= self::rotate($x9 + $x5, 9); + $x1 ^= self::rotate($x13 + $x9, 13); + $x5 ^= self::rotate($x1 + $x13, 18); + $x14 ^= self::rotate($x10 + $x6, 7); + $x2 ^= self::rotate($x14 + $x10, 9); + $x6 ^= self::rotate($x2 + $x14, 13); + $x10 ^= self::rotate($x6 + $x2, 18); + $x3 ^= self::rotate($x15 + $x11, 7); + $x7 ^= self::rotate($x3 + $x15, 9); + $x11 ^= self::rotate($x7 + $x3, 13); + $x15 ^= self::rotate($x11 + $x7, 18); + $x1 ^= self::rotate($x0 + $x3, 7); + $x2 ^= self::rotate($x1 + $x0, 9); + $x3 ^= self::rotate($x2 + $x1, 13); + $x0 ^= self::rotate($x3 + $x2, 18); + $x6 ^= self::rotate($x5 + $x4, 7); + $x7 ^= self::rotate($x6 + $x5, 9); + $x4 ^= self::rotate($x7 + $x6, 13); + $x5 ^= self::rotate($x4 + $x7, 18); + $x11 ^= self::rotate($x10 + $x9, 7); + $x8 ^= self::rotate($x11 + $x10, 9); + $x9 ^= self::rotate($x8 + $x11, 13); + $x10 ^= self::rotate($x9 + $x8, 18); + $x12 ^= self::rotate($x15 + $x14, 7); + $x13 ^= self::rotate($x12 + $x15, 9); + $x14 ^= self::rotate($x13 + $x12, 13); + $x15 ^= self::rotate($x14 + $x13, 18); + } + + return self::store32_le($x0) . + self::store32_le($x5) . + self::store32_le($x10) . + self::store32_le($x15) . + self::store32_le($x6) . + self::store32_le($x7) . + self::store32_le($x8) . + self::store32_le($x9); + } +} -- cgit v1.2.3