pub struct JwkUtils {
pub extract_rsa_public_key_components: fn(&[u8]) -> Result<(Vec<u8>, Vec<u8>)>,
pub extract_ec_public_key_coordinates: fn(&[u8], Algorithm) -> Result<(EllipticCurve, Vec<u8>, Vec<u8>)>,
pub compute_digest: fn(&[u8], ThumbprintHash) -> Vec<u8>,
}Expand description
Holds utility functions required for JWK processing.
Use the JwkUtils::new_unimplemented function to initialize all values to dummies.
Fields§
§extract_rsa_public_key_components: fn(&[u8]) -> Result<(Vec<u8>, Vec<u8>)>Given a DER encoded private key, extract the RSA public key components (n, e)
extract_ec_public_key_coordinates: fn(&[u8], Algorithm) -> Result<(EllipticCurve, Vec<u8>, Vec<u8>)>Given a DER encoded private key and an algorithm, extract the associated curve and the EC public key components (x, y)
compute_digest: fn(&[u8], ThumbprintHash) -> Vec<u8>Given some data and a name of a hash function, compute hash_function(data)
Implementations§
Source§impl JwkUtils
impl JwkUtils
Sourcepub const fn new_unimplemented() -> Self
pub const fn new_unimplemented() -> Self
Initialises all values to dummies. Will lead to a panic when JWKs are required, so only use it if you don’t want to support JWKs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JwkUtils
impl RefUnwindSafe for JwkUtils
impl Send for JwkUtils
impl Sync for JwkUtils
impl Unpin for JwkUtils
impl UnwindSafe for JwkUtils
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