[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/sodium_compat/lib/ -> stream-xchacha20.php (source)

   1  <?php
   2  
   3  if (!is_callable('sodium_crypto_stream_xchacha20')) {
   4      /**
   5       * @see ParagonIE_Sodium_Compat::crypto_stream_xchacha20()
   6       * @param int $len
   7       * @param string $nonce
   8       * @param string $key
   9       * @return string
  10       * @throws SodiumException
  11       * @throws TypeError
  12       */
  13      function sodium_crypto_stream_xchacha20($len, $nonce, $key)
  14      {
  15          return ParagonIE_Sodium_Compat::crypto_stream_xchacha20($len, $nonce, $key, true);
  16      }
  17  }
  18  if (!is_callable('sodium_crypto_stream_xchacha20_keygen')) {
  19      /**
  20       * @see ParagonIE_Sodium_Compat::crypto_stream_xchacha20_keygen()
  21       * @return string
  22       * @throws Exception
  23       */
  24      function sodium_crypto_stream_xchacha20_keygen()
  25      {
  26          return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_keygen();
  27      }
  28  }
  29  if (!is_callable('sodium_crypto_stream_xchacha20_xor')) {
  30      /**
  31       * @see ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor()
  32       * @param string $message
  33       * @param string $nonce
  34       * @param string $key
  35       * @return string
  36       * @throws SodiumException
  37       * @throws TypeError
  38       */
  39      function sodium_crypto_stream_xchacha20_xor($message, $nonce, $key)
  40      {
  41          return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor($message, $nonce, $key, true);
  42      }
  43  }
  44  if (!is_callable('sodium_crypto_stream_xchacha20_xor_ic')) {
  45      /**
  46       * @see ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor_ic()
  47       * @param string $message
  48       * @param string $nonce
  49       * @param int $counter
  50       * @param string $key
  51       * @return string
  52       * @throws SodiumException
  53       * @throws TypeError
  54       */
  55      function sodium_crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key)
  56      {
  57          return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key, true);
  58      }
  59  }


Generated : Thu Apr 25 08:20:02 2024 Cross-referenced by PHPXref