sodium_crypto_box_seal_open

The timeline below displays how wordpress function sodium_crypto_box_seal_open has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * @see ParagonIE_Sodium_Compat::crypto_box_seal_open()
 * @param string $message
 * @param string $key_pair
 * @return string|bool
 * @throws SodiumException
 */
function sodium_crypto_box_seal_open($message, $key_pair)
{
    try {
        return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $key_pair);
    } catch (SodiumException $ex) {
        if ($ex->getMessage() === 'Argument 2 must be CRYPTO_BOX_KEYPAIRBYTES long.') {
            throw $ex;
        }
        return false;
    }
}

WordPress Version: 5.2

/**
 * @see ParagonIE_Sodium_Compat::crypto_box_seal_open()
 * @param string $message
 * @param string $kp
 * @return string|bool
 * @throws SodiumException
 */
function sodium_crypto_box_seal_open($message, $kp)
{
    try {
        return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $kp);
    } catch (SodiumException $ex) {
        if ($ex->getMessage() === 'Argument 2 must be CRYPTO_BOX_KEYPAIRBYTES long.') {
            throw $ex;
        }
        return false;
    }
}