pub struct BasicIdentity { /* private fields */ }
Expand description
A cryptographic identity which signs using an Ed25519 key pair.
The caller will be represented via Principal::self_authenticating
, which contains the SHA-224 hash of the public key.
Implementations§
Source§impl BasicIdentity
impl BasicIdentity
Sourcepub fn from_pem_file<P: AsRef<Path>>(file_path: P) -> Result<Self, PemError>
Available on crate feature pem
only.
pub fn from_pem_file<P: AsRef<Path>>(file_path: P) -> Result<Self, PemError>
pem
only.Create a BasicIdentity
from reading a PEM file at the path.
Sourcepub fn from_pem<R: Read>(pem_reader: R) -> Result<Self, PemError>
Available on crate feature pem
only.
pub fn from_pem<R: Read>(pem_reader: R) -> Result<Self, PemError>
pem
only.Create a BasicIdentity
from reading a PEM File from a Reader.
Sourcepub fn from_signing_key(key: SigningKey) -> Self
pub fn from_signing_key(key: SigningKey) -> Self
Create a BasicIdentity
from a SigningKey
from ed25519-consensus
.
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