Trait PublicKeysProvider

Source
pub trait PublicKeysProvider {
    // Required method
    fn public_keys(&self) -> PublicKeys;
}
Expand description

A trait for types that can provide a complete set of public cryptographic keys.

Types implementing this trait can be used as a source of PublicKeys, which contain both verification and encryption public keys. This trait is particularly useful for key management systems, wallets, identity systems, or any component that needs to provide public keys for cryptographic operations.

§Examples

use bc_components::{PrivateKeyBase, PublicKeysProvider};

// Create a provider of public keys (in this case, a private key base
// that can derive the corresponding public keys)
let key_base = PrivateKeyBase::new();

// Get the public keys from the provider
let public_keys = key_base.public_keys();

// These public keys can be shared with others for secure communication

Required Methods§

Source

fn public_keys(&self) -> PublicKeys

Returns a complete set of public keys for cryptographic operations.

The returned PublicKeys instance contains both verification and encryption public keys that can be used by other parties to securely communicate with the key owner.

§Returns

A PublicKeys instance containing the complete set of public keys.

Implementors§