public static function ParagonIE_Sodium_Core_SecretStream_State::fromString in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core/SecretStream/State.php \ParagonIE_Sodium_Core_SecretStream_State::fromString()
Parameters
string $string:
Return value
self
3 calls to ParagonIE_Sodium_Core_SecretStream_State::fromString()
- ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_pull in vendor/
paragonie/ sodium_compat/ src/ Crypto.php - ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_push in vendor/
paragonie/ sodium_compat/ src/ Crypto.php - ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_rekey in vendor/
paragonie/ sodium_compat/ src/ Crypto.php
File
- vendor/
paragonie/ sodium_compat/ src/ Core/ SecretStream/ State.php, line 140
Class
- ParagonIE_Sodium_Core_SecretStream_State
- Class ParagonIE_Sodium_Core_SecretStream_State
Code
public static function fromString($string) {
$state = new ParagonIE_Sodium_Core_SecretStream_State(ParagonIE_Sodium_Core_Util::substr($string, 0, 32));
$state->counter = ParagonIE_Sodium_Core_Util::load_4(ParagonIE_Sodium_Core_Util::substr($string, 32, 4));
$state->nonce = ParagonIE_Sodium_Core_Util::substr($string, 36, 12);
$state->_pad = ParagonIE_Sodium_Core_Util::substr($string, 48, 8);
return $state;
}