if (self::
useNewSodiumAPI()) { /**
* @psalm-suppress InvalidReturnStatement
* @psalm-suppress FalsableReturnStatement
*/
return sodium_crypto_secretbox_open($ciphertext,
$nonce,
$key);
} if (self::
use_fallback('crypto_secretbox_open'
)) { return call_user_func('\\Sodium\\crypto_secretbox_open',
$ciphertext,
$nonce,
$key);
} if (PHP_INT_SIZE === 4
) { return ParagonIE_Sodium_Crypto32::
secretbox_open($ciphertext,
$nonce,
$key);
} return ParagonIE_Sodium_Crypto::
secretbox_open($ciphertext,
$nonce,
$key);
} /**
* Return a secure random key for use with crypto_secretbox
*
* @return string
* @throws Exception
* @throws Error
*/