pub enum EncodingKey {
Hmac(Vec<u8>),
Rsa(Box<RsaPrivateKey>),
}Expand description
A key to encode a JWT with. Can be a secret, a PEM-encoded key or a DER-encoded key. This key can be re-used so make sure you only initialize it once if you can for better performance
Variants
Hmac(Vec<u8>)
Rsa(Box<RsaPrivateKey>)
Implementations
If you’re using a HMAC secret that is not base64, use that.
If you have a base64 HMAC secret, use that.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for EncodingKey
impl Send for EncodingKey
impl Sync for EncodingKey
impl Unpin for EncodingKey
impl UnwindSafe for EncodingKey
Blanket Implementations
Mutably borrows from an owned value. Read more