PrivateKey

Trait PrivateKey 

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

A private key. The ErasedSerialize implementation must serialize to a JWK.

Required Methods§

Source

fn key_id(&self) -> &str

Key ID.

Source

fn algorithm(&self) -> &str

Algorithm.

Source

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

Sign the message.

Implementors§