pub struct Prime256v1Identity { /* private fields */ }
Expand description
A cryptographic identity based on the Prime256v1 elliptic curve.
The caller will be represented via Principal::self_authenticating
, which contains the SHA-224 hash of the public key.
Implementations§
source§impl Prime256v1Identity
impl Prime256v1Identity
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>
Creates an identity from a PEM file. Shorthand for calling from_pem
with std::fs::read
.
sourcepub fn from_pem<R: Read>(pem_reader: R) -> Result<Self, PemError>
pub fn from_pem<R: Read>(pem_reader: R) -> Result<Self, PemError>
Creates an identity from a PEM certificate.
sourcepub fn from_private_key(private_key: SecretKey) -> Self
pub fn from_private_key(private_key: SecretKey) -> Self
Creates an identity from a private key.
Trait Implementations§
source§impl Clone for Prime256v1Identity
impl Clone for Prime256v1Identity
source§fn clone(&self) -> Prime256v1Identity
fn clone(&self) -> Prime256v1Identity
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Prime256v1Identity
impl Debug for Prime256v1Identity
source§impl Identity for Prime256v1Identity
impl Identity for Prime256v1Identity
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 Prime256v1Identity
impl RefUnwindSafe for Prime256v1Identity
impl Send for Prime256v1Identity
impl Sync for Prime256v1Identity
impl Unpin for Prime256v1Identity
impl UnwindSafe for Prime256v1Identity
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)