Trait ockam_entity::ProfileAuth[][src]

pub trait ProfileAuth {
    fn generate_authentication_proof(
        &mut self,
        channel_state: &[u8]
    ) -> Result<Vec<u8>>;
fn verify_authentication_proof(
        &mut self,
        channel_state: &[u8],
        responder_contact_id: &ProfileIdentifier,
        proof: &[u8]
    ) -> Result<bool>; }
Expand description

Profile authentication support.

Required methods

fn generate_authentication_proof(
    &mut self,
    channel_state: &[u8]
) -> Result<Vec<u8>>
[src]

Generate an authentication proof based on the given channel_state

fn verify_authentication_proof(
    &mut self,
    channel_state: &[u8],
    responder_contact_id: &ProfileIdentifier,
    proof: &[u8]
) -> Result<bool>
[src]

Verify an authentication proof based on the given channel state, proof and profile.

Implementors

impl ProfileAuth for Entity[src]

fn generate_authentication_proof(
    &mut self,
    channel_state: &[u8]
) -> Result<Vec<u8>>
[src]

fn verify_authentication_proof(
    &mut self,
    channel_state: &[u8],
    responder_contact_id: &ProfileIdentifier,
    proof: &[u8]
) -> Result<bool>
[src]

impl ProfileAuth for ProfileSync[src]

fn generate_authentication_proof(
    &mut self,
    channel_state: &[u8]
) -> Result<Vec<u8>>
[src]

fn verify_authentication_proof(
    &mut self,
    channel_state: &[u8],
    responder_contact_id: &ProfileIdentifier,
    proof: &[u8]
) -> Result<bool>
[src]

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

fn generate_authentication_proof(
    &mut self,
    channel_state: &[u8]
) -> Result<Vec<u8>>
[src]

Generate Proof of possession of Profile. channel_state should be tied to channel’s cryptographical material (e.g. h value for Noise XX)

fn verify_authentication_proof(
    &mut self,
    channel_state: &[u8],
    responder_contact_id: &ProfileIdentifier,
    proof: &[u8]
) -> Result<bool>
[src]

Verify Proof of possession of Profile with given ProfileIdentifier. channel_state should be tied to channel’s cryptographical material (e.g. h value for Noise XX)