Struct compact_jwt::crypto::JwsHs256Signer
source · pub struct JwsHs256Signer { /* private fields */ }
Expand description
A JWS signer that creates HMAC SHA256 signatures.
Implementations§
source§impl JwsHs256Signer
impl JwsHs256Signer
sourcepub fn generate_hs256() -> Result<Self, JwtError>
pub fn generate_hs256() -> Result<Self, JwtError>
Create a new secure private key for signing
Trait Implementations§
source§impl Clone for JwsHs256Signer
impl Clone for JwsHs256Signer
source§fn clone(&self) -> JwsHs256Signer
fn clone(&self) -> JwsHs256Signer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for JwsHs256Signer
impl Debug for JwsHs256Signer
source§impl Hash for JwsHs256Signer
impl Hash for JwsHs256Signer
source§impl JwsSigner for JwsHs256Signer
impl JwsSigner for JwsHs256Signer
source§fn get_legacy_kid(&self) -> &str
fn get_legacy_kid(&self) -> &str
Get the legacy format key id from this signer. This value will be removed
in a future release.
source§fn update_header(&self, header: &mut ProtectedHeader) -> Result<(), JwtError>
fn update_header(&self, header: &mut ProtectedHeader) -> Result<(), JwtError>
Update thee content of the header with signer specific data
source§fn sign<V: JwsSignable>(&self, jws: &V) -> Result<V::Signed, JwtError>
fn sign<V: JwsSignable>(&self, jws: &V) -> Result<V::Signed, JwtError>
Perform the signature operation
source§fn set_sign_option_embed_kid(&self, value: bool) -> Self
fn set_sign_option_embed_kid(&self, value: bool) -> Self
Enable or disable embedding the KID in the Jws header
source§impl JwsVerifier for JwsHs256Signer
impl JwsVerifier for JwsHs256Signer
source§impl PartialEq for JwsHs256Signer
impl PartialEq for JwsHs256Signer
source§impl TryFrom<&[u8]> for JwsHs256Signer
impl TryFrom<&[u8]> for JwsHs256Signer
impl Eq for JwsHs256Signer
Auto Trait Implementations§
impl Freeze for JwsHs256Signer
impl RefUnwindSafe for JwsHs256Signer
impl Send for JwsHs256Signer
impl Sync for JwsHs256Signer
impl Unpin for JwsHs256Signer
impl UnwindSafe for JwsHs256Signer
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