public static function ParagonIE_Sodium_Core32_Ed25519::seed_keypair in Automatic Updates 7
Same name and namespace in other branches
- 8 vendor/paragonie/sodium_compat/src/Core32/Ed25519.php \ParagonIE_Sodium_Core32_Ed25519::seed_keypair()
@internal You should not use this directly from another application
Parameters
string $pk:
string $sk:
string $seed:
Return value
string
Throws
SodiumException
TypeError
2 calls to ParagonIE_Sodium_Core32_Ed25519::seed_keypair()
- ParagonIE_Sodium_Compat::crypto_sign_seed_keypair in vendor/
paragonie/ sodium_compat/ src/ Compat.php - Generate an Ed25519 keypair from a seed.
- ParagonIE_Sodium_Core32_Ed25519::keypair in vendor/
paragonie/ sodium_compat/ src/ Core32/ Ed25519.php - @internal You should not use this directly from another application
File
- vendor/
paragonie/ sodium_compat/ src/ Core32/ Ed25519.php, line 42
Class
- ParagonIE_Sodium_Core32_Ed25519
- Class ParagonIE_Sodium_Core32_Ed25519
Code
public static function seed_keypair(&$pk, &$sk, $seed) {
if (self::strlen($seed) !== self::SEED_BYTES) {
throw new RangeException('crypto_sign keypair seed must be 32 bytes long');
}
/** @var string $pk */
$pk = self::publickey_from_secretkey($seed);
$sk = $seed . $pk;
return $sk;
}