pub enum SigningKey {
Secret(SecretKey),
RsaKey(PemEncodedKey),
EcKey(PemEncodedKey),
EdKey(PemEncodedKey),
}Expand description
A signing key used to sign JWTs
Variants§
Implementations§
Source§impl SigningKey
impl SigningKey
pub fn from_secret(secret: &[u8]) -> Self
pub fn from_base64_secret(secret: &str) -> Result<Self, Error>
pub fn from_rsa_pem(key: &[u8]) -> Result<Self, Error>
pub fn from_ec_pem(key: &[u8]) -> Result<Self, Error>
pub fn from_ed_pem(key: &[u8]) -> Result<Self, Error>
pub fn from_rsa_der(key: &[u8]) -> Result<Self, Error>
pub fn from_ec_der(key: &[u8]) -> Result<Self, Error>
pub fn from_ed_der(key: &[u8]) -> Result<Self, Error>
Trait Implementations§
Source§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnsafeUnpin for SigningKey
impl UnwindSafe for SigningKey
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