[−][src]Struct jsonwebtoken::DecodingKey
All the different kind of keys we can use to decode a JWT This key can be re-used so make sure you only initialize it once if you can for better performance
Methods
impl<'a> DecodingKey<'a>
[src]
pub fn from_secret(secret: &'a [u8]) -> Self
[src]
If you're using HMAC, use this.
pub fn from_base64_secret(secret: &str) -> Result<Self>
[src]
If you're using HMAC with a base64 encoded, use this.
pub fn from_rsa_pem(key: &'a [u8]) -> Result<Self>
[src]
If you are loading a public RSA key in a PEM format, use this.
pub fn from_rsa_components(modulus: &'a str, exponent: &'a str) -> Self
[src]
If you have (n, e) RSA public key components, use this.
pub fn from_ec_pem(key: &'a [u8]) -> Result<Self>
[src]
If you have a ECDSA public key in PEM format, use this.
pub fn from_rsa_der(der: &'a [u8]) -> Self
[src]
If you know what you're doing and have a RSA DER encoded public key, use this.
pub fn from_ec_der(der: &'a [u8]) -> Self
[src]
If you know what you're doing and have a RSA EC encoded public key, use this.
pub fn into_static(self) -> DecodingKey<'static>
[src]
Convert self to DecodingKey<'static>
.
Trait Implementations
impl<'a> Clone for DecodingKey<'a>
[src]
fn clone(&self) -> DecodingKey<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for DecodingKey<'a>
[src]
impl<'a> PartialEq<DecodingKey<'a>> for DecodingKey<'a>
[src]
fn eq(&self, other: &DecodingKey<'a>) -> bool
[src]
fn ne(&self, other: &DecodingKey<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for DecodingKey<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for DecodingKey<'a>
impl<'a> Send for DecodingKey<'a>
impl<'a> Sync for DecodingKey<'a>
impl<'a> Unpin for DecodingKey<'a>
impl<'a> UnwindSafe for DecodingKey<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,