You are here

public static function ParagonIE_Sodium_Crypto32::box_open in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/Crypto32.php \ParagonIE_Sodium_Crypto32::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_Crypto32::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_Crypto32::box_seal_open in vendor/paragonie/sodium_compat/src/Crypto32.php
Opens a message encrypted via box_seal().

File

vendor/paragonie/sodium_compat/src/Crypto32.php, line 664

Class

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