public static function ParagonIE_Sodium_Crypto::box_secretkey in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Crypto.php \ParagonIE_Sodium_Crypto::box_secretkey()
@internal Do not use this directly. Use ParagonIE_Sodium_Compat.
Parameters
string $keypair:
Return value
string
Throws
RangeException
TypeError
7 calls to ParagonIE_Sodium_Crypto::box_secretkey()
- ParagonIE_Sodium_Compat::crypto_box_secretkey in vendor/
paragonie/ sodium_compat/ src/ Compat.php - Extract the secret key from a crypto_box keypair.
- 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_Crypto::box_seal in vendor/
paragonie/ sodium_compat/ src/ Crypto.php - X25519-XSalsa20-Poly1305 with one ephemeral X25519 keypair.
- 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 606
Class
- ParagonIE_Sodium_Crypto
- Class ParagonIE_Sodium_Crypto
Code
public static function box_secretkey($keypair) {
if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== 64) {
throw new RangeException('Must be ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES bytes long.');
}
return ParagonIE_Sodium_Core_Util::substr($keypair, 0, 32);
}