WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Core32_SecretStream_State::fromString() public WP 1.0

{} It's a method of the class: ParagonIE_Sodium_Core32_SecretStream_State{}

No Hooks.

Return

self.

Usage

$result = ParagonIE_Sodium_Core32_SecretStream_State::fromString( $string );
$string(string) (required)
-

Code of ParagonIE_Sodium_Core32_SecretStream_State::fromString() WP 5.8.2

public static function fromString($string)
{
    $state = new ParagonIE_Sodium_Core32_SecretStream_State(
        ParagonIE_Sodium_Core32_Util::substr($string, 0, 32)
    );
    $state->counter = ParagonIE_Sodium_Core32_Util::load_4(
        ParagonIE_Sodium_Core32_Util::substr($string, 32, 4)
    );
    $state->nonce = ParagonIE_Sodium_Core32_Util::substr($string, 36, 12);
    $state->_pad = ParagonIE_Sodium_Core32_Util::substr($string, 48, 8);
    return $state;
}