pub struct CesrKey(/* private fields */);Expand description
A CESR-encoded public key (e.g., D + base64url Ed25519, 1AAI + base64url P-256).
Wraps the qualified string form. Use parse() to extract
the curve-tagged KeriPublicKey for cryptographic operations.
Usage:
use auths_keri::CesrKey;
let key = CesrKey::new_unchecked("DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".into());
assert!(key.parse().is_ok());Implementations§
Source§impl CesrKey
impl CesrKey
Sourcepub fn new_unchecked(s: String) -> Self
pub fn new_unchecked(s: String) -> Self
Wrap a qualified key string without validation.
Sourcepub fn parse(&self) -> Result<KeriPublicKey, KeriDecodeError>
pub fn parse(&self) -> Result<KeriPublicKey, KeriDecodeError>
Parse the inner CESR string, dispatching on the derivation code prefix.
Supports Ed25519 (D prefix) and P-256 (1AAJ/1AAI prefix).
Returns Err(UnsupportedKeyType) for unknown prefixes.
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consumes self and returns the inner String.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CesrKey
impl<'de> Deserialize<'de> for CesrKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CesrKey
impl StructuralPartialEq for CesrKey
Auto Trait Implementations§
impl Freeze for CesrKey
impl RefUnwindSafe for CesrKey
impl Send for CesrKey
impl Sync for CesrKey
impl Unpin for CesrKey
impl UnsafeUnpin for CesrKey
impl UnwindSafe for CesrKey
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.