php8.5
Home/ Manual/ sodium / functions/ sodium_crypto_sign_seed_keypair

sodium_crypto_sign_seed_keypair

PHP function Edit on GitHub ✎

(PHP 7 >= 7.2.0, PHP 8)

Deterministically derive the key pair from a single key

Description

sodium_crypto_sign_seed_keypair(string $seed): string

Clamps the seed to form a secret key, derives the public key, and returns the two as a keypair.

The *_seed_keypair functions are ideal for generating a keypair from a password and salt. Use the result as a seed to generate the desired keys.

Parameters

seed

Some cryptographic input. Must be 32 bytes.

Return Values

Keypair (secret key and public key)

Source: reference/sodium/functions/sodium-crypto-sign-seed-keypair.xml · from the official PHP manual (php/doc-en)