You are here

public static function ParagonIE_Sodium_Crypto::box_open in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/Crypto.php \ParagonIE_Sodium_Crypto::box_open()

Decrypt a message encrypted with box().

@internal Do not use this directly. Use ParagonIE_Sodium_Compat.

Parameters

string $ciphertext:

string $nonce:

string $keypair:

Return value

string

Throws

SodiumException

TypeError

2 calls to ParagonIE_Sodium_Crypto::box_open()
ParagonIE_Sodium_Compat::crypto_box_open in vendor/paragonie/sodium_compat/src/Compat.php
Decrypt a message previously encrypted with crypto_box().
ParagonIE_Sodium_Crypto::box_seal_open in vendor/paragonie/sodium_compat/src/Crypto.php
Opens a message encrypted via box_seal().

File

vendor/paragonie/sodium_compat/src/Crypto.php, line 665

Class

ParagonIE_Sodium_Crypto
Class ParagonIE_Sodium_Crypto

Code

public static function box_open($ciphertext, $nonce, $keypair) {
  return self::secretbox_open($ciphertext, $nonce, self::box_beforenm(self::box_secretkey($keypair), self::box_publickey($keypair)));
}