Trait ockam_entity::ProfileSecrets[][src]

pub trait ProfileSecrets {
    fn create_key(
        &mut self,
        key_attributes: KeyAttributes,
        attributes: Option<ProfileEventAttributes>
    ) -> Result<()>;
fn rotate_key(
        &mut self,
        key_attributes: KeyAttributes,
        attributes: Option<ProfileEventAttributes>
    ) -> Result<()>;
fn get_secret_key(
        &mut self,
        key_attributes: &KeyAttributes
    ) -> Result<Secret>;
fn get_public_key(
        &self,
        key_attributes: &KeyAttributes
    ) -> Result<PublicKey>;
fn get_root_secret(&mut self) -> Result<Secret>; }
Expand description

Profile secret management.

Required methods

fn create_key(
    &mut self,
    key_attributes: KeyAttributes,
    attributes: Option<ProfileEventAttributes>
) -> Result<()>
[src]

Create new key. Key is uniquely identified by label in KeyAttributes

fn rotate_key(
    &mut self,
    key_attributes: KeyAttributes,
    attributes: Option<ProfileEventAttributes>
) -> Result<()>
[src]

Rotate existing key. Key is uniquely identified by label in KeyAttributes

fn get_secret_key(&mut self, key_attributes: &KeyAttributes) -> Result<Secret>[src]

Get Secret key. Key is uniquely identified by label in KeyAttributes

fn get_public_key(&self, key_attributes: &KeyAttributes) -> Result<PublicKey>[src]

Get PublicKey. Key is uniquely identified by label in KeyAttributes

fn get_root_secret(&mut self) -> Result<Secret>[src]

Get the root Secret

Implementors

impl ProfileSecrets for Entity[src]

fn create_key(
    &mut self,
    key_attributes: KeyAttributes,
    attributes: Option<ProfileEventAttributes>
) -> Result<()>
[src]

fn rotate_key(
    &mut self,
    key_attributes: KeyAttributes,
    attributes: Option<ProfileEventAttributes>
) -> Result<()>
[src]

fn get_secret_key(&mut self, key_attributes: &KeyAttributes) -> Result<Secret>[src]

fn get_public_key(&self, key_attributes: &KeyAttributes) -> Result<PublicKey>[src]

fn get_root_secret(&mut self) -> Result<Secret>[src]

impl ProfileSecrets for ProfileSync[src]

fn create_key(
    &mut self,
    key_attributes: KeyAttributes,
    attributes: Option<ProfileEventAttributes>
) -> Result<()>
[src]

fn rotate_key(
    &mut self,
    key_attributes: KeyAttributes,
    attributes: Option<ProfileEventAttributes>
) -> Result<()>
[src]

fn get_secret_key(&mut self, key_attributes: &KeyAttributes) -> Result<Secret>[src]

fn get_public_key(&self, key_attributes: &KeyAttributes) -> Result<PublicKey>[src]

fn get_root_secret(&mut self) -> Result<Secret>[src]

impl<V: ProfileVault> ProfileSecrets for ProfileImpl<V>[src]

fn get_secret_key(&mut self, key_attributes: &KeyAttributes) -> Result<Secret>[src]

Get Secret key. Key is uniquely identified by label in KeyAttributes

fn create_key(
    &mut self,
    key_attributes: KeyAttributes,
    attributes: Option<ProfileEventAttributes>
) -> Result<()>
[src]

fn rotate_key(
    &mut self,
    key_attributes: KeyAttributes,
    attributes: Option<ProfileEventAttributes>
) -> Result<()>
[src]

fn get_public_key(&self, key_attributes: &KeyAttributes) -> Result<PublicKey>[src]

fn get_root_secret(&mut self) -> Result<Secret>[src]