Skip to main content

KeyMaterial

Trait KeyMaterial 

Source
pub trait KeyMaterial:
    Sealed
    + Clone
    + Send
    + Sync
    + 'static {
    const ENTRY: &'static str;
    const FILE: StoreFile;

    // Required methods
    fn to_secret_bytes(&self) -> SecretBytes;
    fn from_secret_bytes(bytes: &[u8]) -> Result<Self, MaterialError>;
}
Expand description

What custody keeps: the store keys or the member’s identity. Sealed: coven alone says how each is named and encoded.

Required Associated Constants§

Source

const ENTRY: &'static str

The keychain entry and passphrase file entry it is kept under.

Source

const FILE: StoreFile

The store file a passphrase custody seals it in.

Required Methods§

Source

fn to_secret_bytes(&self) -> SecretBytes

Encode it for custody.

Source

fn from_secret_bytes(bytes: &[u8]) -> Result<Self, MaterialError>

Decode what to_secret_bytes encoded.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl KeyMaterial for MemberIdentity

Source§

const ENTRY: &'static str = "member-keys"

Source§

const FILE: StoreFile = StoreFile::MemberKeys

Source§

impl KeyMaterial for StoreKeyring

Source§

const ENTRY: &'static str = "store-keys"

Source§

const FILE: StoreFile = StoreFile::StoreKeys