ParagonIE_Sodium_Core32_SecretStream_State::fromString

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core32_SecretStream_State::fromString( string $string )

Parameters Parameters

$string

(string) (Required)

Return Return

(self)

Source Source

File: wp-includes/sodium_compat/src/Core32/SecretStream/State.php

    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;
    }

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.