[−][src]Trait parsec::SecretId
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
Loading content...Required methods
fn public_id(&self) -> &Self::PublicId
Returns the associated public identity.
fn sign_detached(&self, data: &[u8]) -> <Self::PublicId as PublicId>::Signature
Creates a detached Signature
of data
.
fn encrypt<M: AsRef<[u8]>>(
&self,
to: &Self::PublicId,
msg: M
) -> Option<Vec<u8>>
&self,
to: &Self::PublicId,
msg: M
) -> Option<Vec<u8>>
Encrypts the message using own Rng to to
fn decrypt(&self, from: &Self::PublicId, ct: &[u8]) -> Option<Vec<u8>>
Decrypt message from from
.