wp/wp-includes/sodium_compat/lib/stream-xchacha20.php
changeset 21 48c4eec2b7e6
parent 18 be944660c56a
child 22 8c2e4d02f4ef
--- a/wp/wp-includes/sodium_compat/lib/stream-xchacha20.php	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/sodium_compat/lib/stream-xchacha20.php	Fri Sep 05 18:40:08 2025 +0200
@@ -41,3 +41,19 @@
         return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor($message, $nonce, $key, true);
     }
 }
+if (!is_callable('sodium_crypto_stream_xchacha20_xor_ic')) {
+    /**
+     * @see ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor_ic()
+     * @param string $message
+     * @param string $nonce
+     * @param int $counter
+     * @param string $key
+     * @return string
+     * @throws SodiumException
+     * @throws TypeError
+     */
+    function sodium_crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key)
+    {
+        return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key, true);
+    }
+}