[][src]Trait parsec::SecretId

pub trait SecretId {
    type PublicId: PublicId;
    pub fn public_id(&self) -> &Self::PublicId;
pub fn sign_detached(
        &self,
        data: &[u8]
    ) -> <Self::PublicId as PublicId>::Signature;
pub fn encrypt<M: AsRef<[u8]>>(
        &self,
        to: &Self::PublicId,
        msg: M
    ) -> Option<Vec<u8>>;
pub fn decrypt(&self, from: &Self::PublicId, ct: &[u8]) -> Option<Vec<u8>>; pub fn create_proof(&self, data: &[u8]) -> Proof<Self::PublicId> { ... } }

The secret identity of a node. It provides functionality to allow it to be used as an asymmetric signing secret key and to also yield the associated public identity.

Associated Types

type PublicId: PublicId[src]

The associated public identity type.

Loading content...

Required methods

pub fn public_id(&self) -> &Self::PublicId[src]

Returns the associated public identity.

pub fn sign_detached(
    &self,
    data: &[u8]
) -> <Self::PublicId as PublicId>::Signature
[src]

Creates a detached Signature of data.

pub fn encrypt<M: AsRef<[u8]>>(
    &self,
    to: &Self::PublicId,
    msg: M
) -> Option<Vec<u8>>
[src]

Encrypts the message using own Rng to to

pub fn decrypt(&self, from: &Self::PublicId, ct: &[u8]) -> Option<Vec<u8>>[src]

Decrypt message from from.

Loading content...

Provided methods

pub fn create_proof(&self, data: &[u8]) -> Proof<Self::PublicId>[src]

Creates a Proof of data.

Loading content...

Implementors

Loading content...