pub fn keypair_using(
rng: &mut impl RandomNumberGenerator,
) -> Result<(PrivateKeys, PublicKeys)>Expand description
Generates a key pair using the default schemes and a custom random number generator.
This function creates a deterministic key pair using the provided random number generator and the default cryptographic schemes.
§Parameters
rng- A mutable reference to a random number generator
§Returns
A Result containing a tuple with PrivateKeys and PublicKeys if
successful, or an error if key generation fails.
§Errors
Returns an error if either the signature or encapsulation key generation fails.
§Example
use bc_components::keypair_using;
use bc_rand::SecureRandomNumberGenerator;
// Create a random number generator
let mut rng = SecureRandomNumberGenerator;
// Generate a key pair with default schemes but custom RNG
let result = keypair_using(&mut rng);
assert!(result.is_ok());