public static function ParagonIE_Sodium_Crypto32::box_seed_keypair in Automatic Updates 8
Same name and namespace in other branches
- 7 vendor/paragonie/sodium_compat/src/Crypto32.php \ParagonIE_Sodium_Crypto32::box_seed_keypair()
Parameters
string $seed:
Return value
string
Throws
SodiumException
TypeError
1 call to ParagonIE_Sodium_Crypto32::box_seed_keypair()
- ParagonIE_Sodium_Compat::crypto_box_seed_keypair in vendor/
paragonie/ sodium_compat/ src/ Compat.php - Generate an X25519 keypair from a seed.
File
- vendor/
paragonie/ sodium_compat/ src/ Crypto32.php, line 572
Class
- ParagonIE_Sodium_Crypto32
- Class ParagonIE_Sodium_Crypto
Code
public static function box_seed_keypair($seed) {
$sKey = ParagonIE_Sodium_Core32_Util::substr(hash('sha512', $seed, true), 0, 32);
$pKey = self::scalarmult_base($sKey);
return $sKey . $pKey;
}