pub trait JwkEncoder {
// Required methods
fn alg(&self) -> Option<KeyAlg>;
fn add_str(&mut self, key: &str, value: &str) -> Result<(), Error>;
fn add_as_base64(&mut self, key: &str, value: &[u8]) -> Result<(), Error>;
fn mode(&self) -> JwkEncoderMode;
// Provided methods
fn is_public(&self) -> bool { ... }
fn is_secret(&self) -> bool { ... }
fn is_thumbprint(&self) -> bool { ... }
}Expand description
Common interface for JWK encoders
Required Methods§
Sourcefn add_as_base64(&mut self, key: &str, value: &[u8]) -> Result<(), Error>
fn add_as_base64(&mut self, key: &str, value: &[u8]) -> Result<(), Error>
Add a binary attribute to be encoded as unpadded base64-URL
Sourcefn mode(&self) -> JwkEncoderMode
fn mode(&self) -> JwkEncoderMode
Accessor for the encoder mode
Provided Methods§
Sourcefn is_thumbprint(&self) -> bool
fn is_thumbprint(&self) -> bool
Check if the mode is thumbprint