class ParagonIE_Sodium_Core32_XChaCha20 in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Core32/XChaCha20.php \ParagonIE_Sodium_Core32_XChaCha20
Class ParagonIE_Sodium_Core32_XChaCha20
Hierarchy
- class \ParagonIE_Sodium_Core_Util
Expanded class hierarchy of ParagonIE_Sodium_Core32_XChaCha20
1 string reference to 'ParagonIE_Sodium_Core32_XChaCha20'
- XChaCha20.php in vendor/
paragonie/ sodium_compat/ src/ Core32/ XChaCha20.php
File
- vendor/
paragonie/ sodium_compat/ src/ Core32/ XChaCha20.php, line 10
View source
class ParagonIE_Sodium_Core32_XChaCha20 extends ParagonIE_Sodium_Core32_HChaCha20 {
/**
* @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 stream($len = 64, $nonce = '', $key = '') {
if (self::strlen($nonce) !== 24) {
throw new SodiumException('Nonce must be 24 bytes long');
}
return self::encryptBytes(new ParagonIE_Sodium_Core32_ChaCha20_Ctx(self::hChaCha20(self::substr($nonce, 0, 16), $key), self::substr($nonce, 16, 8)), str_repeat("\0", $len));
}
/**
* @internal You should not use this directly from another application
*
* @param string $message
* @param string $nonce
* @param string $key
* @param string $ic
* @return string
* @throws SodiumException
* @throws TypeError
*/
public static function streamXorIc($message, $nonce = '', $key = '', $ic = '') {
if (self::strlen($nonce) !== 24) {
throw new SodiumException('Nonce must be 24 bytes long');
}
return self::encryptBytes(new ParagonIE_Sodium_Core32_ChaCha20_Ctx(self::hChaCha20(self::substr($nonce, 0, 16), $key), self::substr($nonce, 16, 8), $ic), $message);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ParagonIE_Sodium_Core32_ChaCha20:: |
public static | function | @internal You should not use this directly from another application | |
ParagonIE_Sodium_Core32_ChaCha20:: |
public static | function | @internal You should not use this directly from another application | |
ParagonIE_Sodium_Core32_ChaCha20:: |
public static | function | @internal You should not use this directly from another application | |
ParagonIE_Sodium_Core32_ChaCha20:: |
protected static | function | The ChaCha20 quarter round function. Works on four 32-bit integers. | |
ParagonIE_Sodium_Core32_HChaCha20:: |
public static | function | ||
ParagonIE_Sodium_Core32_HChaCha20:: |
protected static | function | ||
ParagonIE_Sodium_Core32_XChaCha20:: |
public static | function |
@internal You should not use this directly from another application Overrides ParagonIE_Sodium_Core32_ChaCha20:: |
|
ParagonIE_Sodium_Core32_XChaCha20:: |
public static | function |
@internal You should not use this directly from another application Overrides ParagonIE_Sodium_Core32_ChaCha20:: |
|
ParagonIE_Sodium_Core_Util:: |
public static | function | ||
ParagonIE_Sodium_Core_Util:: |
public static | function | Convert a binary string into a hexadecimal string without cache-timing leaks | |
ParagonIE_Sodium_Core_Util:: |
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:: |
public static | function | Cache-timing-safe variant of ord() | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Compares two strings. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | If a variable does not match a given type, throw a TypeError. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Evaluate whether or not two strings are equal (in constant-time) | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Convert a hexadecimal string into a binary string without cache-timing leaks | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Turn an array of integers into a string | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Cache-timing-safe variant of ord() | |
ParagonIE_Sodium_Core_Util:: |
protected static | function | Returns whether or not mbstring.func_overload is in effect. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Load a 8 character substring into an integer | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Load a 3 character substring into an integer | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Load a 4 character substring into an integer | |
ParagonIE_Sodium_Core_Util:: |
public static | function | @internal You should not use this directly from another application | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Multiply two integers in constant-time | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Convert any arbitrary numbers into two 32-bit integers that represent a 64-bit integer. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Store a 32-bit integer into a string, treating it as little-endian. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Stores a 64-bit integer as an string, treating it as little-endian. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Store a 24-bit integer into a string, treating it as big-endian. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Store a 32-bit integer into a string, treating it as big-endian. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Turn a string into an array of integers | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Safe string length | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Safe substring | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Compare a 16-character byte string in constant time. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Compare a 32-character byte string in constant time. | |
ParagonIE_Sodium_Core_Util:: |
public static | function | Calculate $a ^ $b for two strings. |