pub struct Key(/* private fields */);Expand description
The private key of a device.
Implementations§
Source§impl Key
impl Key
Sourcepub fn from_secret(secret: &str) -> Result<Self, DpopError>
pub fn from_secret(secret: &str) -> Result<Self, DpopError>
Reads a key from Key::to_secret.
Sourcepub fn to_secret(&self) -> String
pub fn to_secret(&self) -> String
The private key as base64url. Keep it only in the OS keyring.
Sourcepub fn thumbprint(&self) -> String
pub fn thumbprint(&self) -> String
The JWK thumbprint of the public key (RFC 7638).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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