pub struct BasicIdentity { /* private fields */ }
Expand description
A Basic Identity which sign using an ED25519 key pair.
Implementations§
source§impl BasicIdentity
impl BasicIdentity
sourcepub fn from_pem_file<P: AsRef<Path>>(file_path: P) -> Result<Self, PemError>
pub fn from_pem_file<P: AsRef<Path>>(file_path: P) -> Result<Self, PemError>
Create a BasicIdentity from reading a PEM file at the path.
sourcepub fn from_pem<R: Read>(pem_reader: R) -> Result<Self, PemError>
pub fn from_pem<R: Read>(pem_reader: R) -> Result<Self, PemError>
Create a BasicIdentity from reading a PEM File from a Reader.
sourcepub fn from_key_pair(key_pair: Ed25519KeyPair) -> Self
pub fn from_key_pair(key_pair: Ed25519KeyPair) -> Self
Create a BasicIdentity from a KeyPair from the ring crate.
Trait Implementations§
source§impl Debug for BasicIdentity
impl Debug for BasicIdentity
source§impl Identity for BasicIdentity
impl Identity for BasicIdentity
source§fn sender(&self) -> Result<Principal, String>
fn sender(&self) -> Result<Principal, String>
Returns a sender, ie. the Principal ID that is used to sign a request. Read more
source§fn sign(&self, content: &EnvelopeContent) -> Result<Signature, String>
fn sign(&self, content: &EnvelopeContent) -> Result<Signature, String>
Sign a request ID derived from a content map. Read more
source§fn sign_delegation(&self, content: &Delegation) -> Result<Signature, String>
fn sign_delegation(&self, content: &Delegation) -> Result<Signature, String>
source§fn sign_arbitrary(&self, content: &[u8]) -> Result<Signature, String>
fn sign_arbitrary(&self, content: &[u8]) -> Result<Signature, String>
Sign arbitrary bytes. Read more
source§fn delegation_chain(&self) -> Vec<SignedDelegation>
fn delegation_chain(&self) -> Vec<SignedDelegation>
A list of signed delegations connecting
sender
to public_key
, and in that order.Auto Trait Implementations§
impl Freeze for BasicIdentity
impl RefUnwindSafe for BasicIdentity
impl Send for BasicIdentity
impl Sync for BasicIdentity
impl Unpin for BasicIdentity
impl UnwindSafe for BasicIdentity
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more