pub struct KeyUtils;Expand description
Utility functions for key management
Implementations§
Source§impl KeyUtils
impl KeyUtils
Sourcepub fn generate_key_id(public_key: &Ed25519PublicKey) -> String
pub fn generate_key_id(public_key: &Ed25519PublicKey) -> String
Generate a unique key ID from a public key
Sourcepub fn signature_from_base64(base64_sig: &str) -> SecurityResult<Signature>
pub fn signature_from_base64(base64_sig: &str) -> SecurityResult<Signature>
Parse a signature from base64-encoded string
Sourcepub fn signature_to_base64(signature: &Signature) -> String
pub fn signature_to_base64(signature: &Signature) -> String
Convert a signature to base64-encoded string
Sourcepub fn generate_nonce() -> String
pub fn generate_nonce() -> String
Generate a random nonce
Auto Trait Implementations§
impl Freeze for KeyUtils
impl RefUnwindSafe for KeyUtils
impl Send for KeyUtils
impl Sync for KeyUtils
impl Unpin for KeyUtils
impl UnwindSafe for KeyUtils
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more