Skip to main content

Signer

Trait Signer 

Source
pub trait Signer {
    // Required methods
    fn name(&self) -> &str;
    fn sign(&self, message: &[u8]) -> Result<Vec<u8>, JwtError>;
}
Expand description

Trait for JWT signing algorithms.

Required Methods§

Source

fn name(&self) -> &str

Returns the algorithm name.

Source

fn sign(&self, message: &[u8]) -> Result<Vec<u8>, JwtError>

Signs a message and returns the signature.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§