ParagonIE_Sodium_Core_SecretStream_State::fromString

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core_SecretStream_State::fromString( string $string )

Parameters Parameters

$string

(Required)

Return Return

(self)

Source Source

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

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

Advertisement

Advertisement

Leave a Reply