public static function ParagonIE_Sodium_Crypto32::scalarmult in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Crypto32.php \ParagonIE_Sodium_Crypto32::scalarmult()
ECDH over Curve25519
@internal Do not use this directly. Use ParagonIE_Sodium_Compat.
Parameters
string $sKey:
string $pKey:
Return value
string
Throws
SodiumException
TypeError
3 calls to ParagonIE_Sodium_Crypto32::scalarmult()
- ParagonIE_Sodium_Compat::crypto_scalarmult in vendor/
paragonie/ sodium_compat/ src/ Compat.php - Calculate the shared secret between your secret key and your recipient's public key.
- ParagonIE_Sodium_Crypto32::box_beforenm in vendor/
paragonie/ sodium_compat/ src/ Crypto32.php - Used by crypto_box() to get the crypto_secretbox() key.
- ParagonIE_Sodium_Crypto32::keyExchange in vendor/
paragonie/ sodium_compat/ src/ Crypto32.php - Libsodium's crypto_kx().
File
- vendor/
paragonie/ sodium_compat/ src/ Crypto32.php, line 887
Class
- ParagonIE_Sodium_Crypto32
- Class ParagonIE_Sodium_Crypto
Code
public static function scalarmult($sKey, $pKey) {
$q = ParagonIE_Sodium_Core32_X25519::crypto_scalarmult_curve25519_ref10($sKey, $pKey);
self::scalarmult_throw_if_zero($q);
return $q;
}