Struct jwt_compact::alg::Hs256Key
source · pub struct Hs256Key(/* private fields */);
Expand description
Signing / verifying key for HS256
algorithm. Zeroed on drop.
Implementations§
Trait Implementations§
source§impl<'a> From<&'a Hs256Key> for JsonWebKey<'a>
impl<'a> From<&'a Hs256Key> for JsonWebKey<'a>
source§fn from(key: &'a Hs256Key) -> JsonWebKey<'a>
fn from(key: &'a Hs256Key) -> JsonWebKey<'a>
Converts to this type from the input type.
source§impl SigningKey<Hs256> for Hs256Key
impl SigningKey<Hs256> for Hs256Key
source§fn from_slice(raw: &[u8]) -> Result<Self>
fn from_slice(raw: &[u8]) -> Result<Self>
Creates a key from
raw
bytes. Returns an error if the bytes do not represent
a valid key.source§fn to_verifying_key(&self) -> Self
fn to_verifying_key(&self) -> Self
Converts a signing key to a verification key.
source§fn as_bytes(&self) -> SecretBytes<'_>
fn as_bytes(&self) -> SecretBytes<'_>
Returns the key as raw bytes. Read more
source§impl TryFrom<&JsonWebKey<'_>> for Hs256Key
impl TryFrom<&JsonWebKey<'_>> for Hs256Key
source§impl VerifyingKey<Hs256> for Hs256Key
impl VerifyingKey<Hs256> for Hs256Key
Auto Trait Implementations§
impl Freeze for Hs256Key
impl RefUnwindSafe for Hs256Key
impl Send for Hs256Key
impl Sync for Hs256Key
impl Unpin for Hs256Key
impl UnwindSafe for Hs256Key
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)