WordPress at a glance
function is not described

ParagonIE_Sodium_Crypto::box_seal_open() public WP 1.0

Opens a message encrypted via box_seal().

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

No Hooks.

Return

String. Null. Nothing.

Usage

$result = ParagonIE_Sodium_Crypto::box_seal_open( $message, $keypair );
$message(string) (required)
-
$keypair(string) (required)
-

Code of ParagonIE_Sodium_Crypto::box_seal_open() WP 5.7

<?php
public static function box_seal_open($message, $keypair)
{
    /** @var string $ephemeralPK */
    $ephemeralPK = ParagonIE_Sodium_Core_Util::substr($message, 0, 32);

    /** @var string $ciphertext (ciphertext + MAC) */
    $ciphertext = ParagonIE_Sodium_Core_Util::substr($message, 32);

    /** @var string $secretKey */
    $secretKey = self::box_secretkey($keypair);

    /** @var string $publicKey */
    $publicKey = self::box_publickey($keypair);

    /** @var string $nonce */
    $nonce = self::generichash(
        $ephemeralPK . $publicKey,
        '',
        24
    );

    /** @var string $keypair */
    $keypair = self::box_keypair_from_secretkey_and_publickey($secretKey, $ephemeralPK);

    /** @var string $m */
    $m = self::box_open($ciphertext, $nonce, $keypair);
    try {
        ParagonIE_Sodium_Compat::memzero($secretKey);
        ParagonIE_Sodium_Compat::memzero($ephemeralPK);
        ParagonIE_Sodium_Compat::memzero($nonce);
    } catch (SodiumException $ex) {
        $secretKey = null;
        $ephemeralPK = null;
        $nonce = null;
    }
    return $m;
}