class ParagonIE_Sodium_Core_ChaCha20_IetfCtx in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php \ParagonIE_Sodium_Core_ChaCha20_IetfCtx
Class ParagonIE_Sodium_Core_ChaCha20_IetfCtx
Hierarchy
- class \ParagonIE_Sodium_Core_Util
- class \ParagonIE_Sodium_Core_ChaCha20_Ctx implements \ArrayAccess
Expanded class hierarchy of ParagonIE_Sodium_Core_ChaCha20_IetfCtx
2 string references to 'ParagonIE_Sodium_Core_ChaCha20_IetfCtx'
- IetfCtx.php in vendor/
paragonie/ sodium_compat/ src/ Core/ ChaCha20/ IetfCtx.php - IetfCtx.php in vendor/
paragonie/ sodium_compat/ src/ Core32/ ChaCha20/ IetfCtx.php
File
- vendor/
paragonie/ sodium_compat/ src/ Core/ ChaCha20/ IetfCtx.php, line 10
View source
class ParagonIE_Sodium_Core_ChaCha20_IetfCtx extends ParagonIE_Sodium_Core_ChaCha20_Ctx {
/**
* ParagonIE_Sodium_Core_ChaCha20_IetfCtx constructor.
*
* @internal You should not use this directly from another application
*
* @param string $key ChaCha20 key.
* @param string $iv Initialization Vector (a.k.a. nonce).
* @param string $counter The initial counter value.
* Defaults to 4 0x00 bytes.
* @throws InvalidArgumentException
* @throws TypeError
*/
public function __construct($key = '', $iv = '', $counter = '') {
if (self::strlen($iv) !== 12) {
throw new InvalidArgumentException('ChaCha20 expects a 96-bit nonce in IETF mode.');
}
parent::__construct($key, self::substr($iv, 0, 8), $counter);
if (!empty($counter)) {
$this->container[12] = self::load_4(self::substr($counter, 0, 4));
}
$this->container[13] = self::load_4(self::substr($iv, 0, 4));
$this->container[14] = self::load_4(self::substr($iv, 4, 4));
$this->container[15] = self::load_4(self::substr($iv, 8, 4));
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ParagonIE_Sodium_Core_ChaCha20_Ctx:: |
protected | property | ||
ParagonIE_Sodium_Core_ChaCha20_Ctx:: |
public | function | @internal You should not use this directly from another application | |
ParagonIE_Sodium_Core_ChaCha20_Ctx:: |
public | function | @internal You should not use this directly from another application | |
ParagonIE_Sodium_Core_ChaCha20_Ctx:: |
public | function | @internal You should not use this directly from another application | |
ParagonIE_Sodium_Core_ChaCha20_Ctx:: |
public | function | @internal You should not use this directly from another application | |
ParagonIE_Sodium_Core_ChaCha20_IetfCtx:: |
public | function |
ParagonIE_Sodium_Core_ChaCha20_IetfCtx constructor. Overrides ParagonIE_Sodium_Core_ChaCha20_Ctx:: |
|
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. |