pub enum Thumbprintable {
EC {
crv: String,
x: String,
y: String,
},
OKP {
crv: String,
x: String,
},
RSA {
e: String,
n: String,
},
OCT {
k: String,
},
}Expand description
Represents a JSON Web Key containing the bare minimum that can be thumbprinted per RFC 7638
Variants§
Implementations§
Source§impl Thumbprintable
impl Thumbprintable
Sourcepub fn b64_thumbprint(&self) -> String
pub fn b64_thumbprint(&self) -> String
Calculate the base64-encoded URL safe JWK thumbprint associated with the key
Sourcepub fn public_key(&self) -> Result<Vec<u8>, KeyringError>
pub fn public_key(&self) -> Result<Vec<u8>, KeyringError>
Attempt to cast into a public key.
§Errors
Today we only support importing ed25519 keys. Errors may be thrown when decoding or converting the JSON web key into an ed25519 public key.
Trait Implementations§
Source§impl Clone for Thumbprintable
impl Clone for Thumbprintable
Source§fn clone(&self) -> Thumbprintable
fn clone(&self) -> Thumbprintable
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Thumbprintable
impl Debug for Thumbprintable
Source§impl<'de> Deserialize<'de> for Thumbprintable
impl<'de> Deserialize<'de> for Thumbprintable
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
Source§impl PartialEq for Thumbprintable
impl PartialEq for Thumbprintable
Source§impl Serialize for Thumbprintable
impl Serialize for Thumbprintable
impl Eq for Thumbprintable
impl StructuralPartialEq for Thumbprintable
Auto Trait Implementations§
impl Freeze for Thumbprintable
impl RefUnwindSafe for Thumbprintable
impl Send for Thumbprintable
impl Sync for Thumbprintable
impl Unpin for Thumbprintable
impl UnwindSafe for Thumbprintable
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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.