public static function ParagonIE_Sodium_Crypto::box_beforenm in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Crypto.php \ParagonIE_Sodium_Crypto::box_beforenm()
Used by crypto_box() to get the crypto_secretbox() key.
@internal Do not use this directly. Use ParagonIE_Sodium_Compat.
Parameters
string $sk:
string $pk:
Return value
string
Throws
SodiumException
TypeError
4 calls to ParagonIE_Sodium_Crypto::box_beforenm()
- ParagonIE_Sodium_Crypto::box in vendor/
paragonie/ sodium_compat/ src/ Crypto.php - X25519 key exchange followed by XSalsa20Poly1305 symmetric encryption
- ParagonIE_Sodium_Crypto::box_open in vendor/
paragonie/ sodium_compat/ src/ Crypto.php - Decrypt a message encrypted with box().
- ParagonIE_Sodium_File::box_decrypt in vendor/
paragonie/ sodium_compat/ src/ File.php - ParagonIE_Sodium_File::box_encrypt in vendor/
paragonie/ sodium_compat/ src/ File.php
File
- vendor/
paragonie/ sodium_compat/ src/ Crypto.php, line 544
Class
- ParagonIE_Sodium_Crypto
- Class ParagonIE_Sodium_Crypto
Code
public static function box_beforenm($sk, $pk) {
return ParagonIE_Sodium_Core_HSalsa20::hsalsa20(str_repeat("\0", 16), self::scalarmult($sk, $pk));
}