You are here

abstract class ParagonIE_Sodium_Core32_XSalsa20 in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/Core32/XSalsa20.php \ParagonIE_Sodium_Core32_XSalsa20

Class ParagonIE_Sodium_Core32_XSalsa20

Hierarchy

Expanded class hierarchy of ParagonIE_Sodium_Core32_XSalsa20

1 string reference to 'ParagonIE_Sodium_Core32_XSalsa20'
XSalsa20.php in vendor/paragonie/sodium_compat/src/Core32/XSalsa20.php

File

vendor/paragonie/sodium_compat/src/Core32/XSalsa20.php, line 10

View source
abstract class ParagonIE_Sodium_Core32_XSalsa20 extends ParagonIE_Sodium_Core32_HSalsa20 {

  /**
   * Expand a key and nonce into an xsalsa20 keystream.
   *
   * @internal You should not use this directly from another application
   *
   * @param int $len
   * @param string $nonce
   * @param string $key
   * @return string
   * @throws SodiumException
   * @throws TypeError
   */
  public static function xsalsa20($len, $nonce, $key) {
    $ret = self::salsa20($len, self::substr($nonce, 16, 8), self::hsalsa20($nonce, $key));
    return $ret;
  }

  /**
   * Encrypt a string with XSalsa20. Doesn't provide integrity.
   *
   * @internal You should not use this directly from another application
   *
   * @param string $message
   * @param string $nonce
   * @param string $key
   * @return string
   * @throws SodiumException
   * @throws TypeError
   */
  public static function xsalsa20_xor($message, $nonce, $key) {
    return self::xorStrings($message, self::xsalsa20(self::strlen($message), $nonce, $key));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ParagonIE_Sodium_Core32_HSalsa20::hsalsa20 public static function Calculate an hsalsa20 hash of a single block
ParagonIE_Sodium_Core32_Salsa20::core_salsa20 public static function Calculate an salsa20 hash of a single block
ParagonIE_Sodium_Core32_Salsa20::ROUNDS constant
ParagonIE_Sodium_Core32_Salsa20::salsa20 public static function @internal You should not use this directly from another application
ParagonIE_Sodium_Core32_Salsa20::salsa20_xor public static function @internal You should not use this directly from another application
ParagonIE_Sodium_Core32_Salsa20::salsa20_xor_ic public static function @internal You should not use this directly from another application
ParagonIE_Sodium_Core32_XSalsa20::xsalsa20 public static function Expand a key and nonce into an xsalsa20 keystream.
ParagonIE_Sodium_Core32_XSalsa20::xsalsa20_xor public static function Encrypt a string with XSalsa20. Doesn't provide integrity.
ParagonIE_Sodium_Core_Util::abs public static function
ParagonIE_Sodium_Core_Util::bin2hex public static function Convert a binary string into a hexadecimal string without cache-timing leaks
ParagonIE_Sodium_Core_Util::bin2hexUpper public static function Convert a binary string into a hexadecimal string without cache-timing leaks, returning uppercase letters (as per RFC 4648)
ParagonIE_Sodium_Core_Util::chrToInt public static function Cache-timing-safe variant of ord()
ParagonIE_Sodium_Core_Util::compare public static function Compares two strings.
ParagonIE_Sodium_Core_Util::declareScalarType public static function If a variable does not match a given type, throw a TypeError.
ParagonIE_Sodium_Core_Util::hashEquals public static function Evaluate whether or not two strings are equal (in constant-time)
ParagonIE_Sodium_Core_Util::hex2bin public static function Convert a hexadecimal string into a binary string without cache-timing leaks
ParagonIE_Sodium_Core_Util::intArrayToString public static function Turn an array of integers into a string
ParagonIE_Sodium_Core_Util::intToChr public static function Cache-timing-safe variant of ord()
ParagonIE_Sodium_Core_Util::isMbStringOverride protected static function Returns whether or not mbstring.func_overload is in effect.
ParagonIE_Sodium_Core_Util::load64_le public static function Load a 8 character substring into an integer
ParagonIE_Sodium_Core_Util::load_3 public static function Load a 3 character substring into an integer
ParagonIE_Sodium_Core_Util::load_4 public static function Load a 4 character substring into an integer
ParagonIE_Sodium_Core_Util::memcmp public static function @internal You should not use this directly from another application
ParagonIE_Sodium_Core_Util::mul public static function Multiply two integers in constant-time
ParagonIE_Sodium_Core_Util::numericTo64BitInteger public static function Convert any arbitrary numbers into two 32-bit integers that represent a 64-bit integer.
ParagonIE_Sodium_Core_Util::store32_le public static function Store a 32-bit integer into a string, treating it as little-endian.
ParagonIE_Sodium_Core_Util::store64_le public static function Stores a 64-bit integer as an string, treating it as little-endian.
ParagonIE_Sodium_Core_Util::store_3 public static function Store a 24-bit integer into a string, treating it as big-endian.
ParagonIE_Sodium_Core_Util::store_4 public static function Store a 32-bit integer into a string, treating it as big-endian.
ParagonIE_Sodium_Core_Util::stringToIntArray public static function Turn a string into an array of integers
ParagonIE_Sodium_Core_Util::strlen public static function Safe string length
ParagonIE_Sodium_Core_Util::substr public static function Safe substring
ParagonIE_Sodium_Core_Util::verify_16 public static function Compare a 16-character byte string in constant time.
ParagonIE_Sodium_Core_Util::verify_32 public static function Compare a 32-character byte string in constant time.
ParagonIE_Sodium_Core_Util::xorStrings public static function Calculate $a ^ $b for two strings.