Skip to main content

Signer

Trait Signer 

Source
pub trait Signer {
    // Required methods
    fn key_id(&self) -> &KeyId;
    fn algorithm(&self) -> SignatureAlgorithm;
    async fn sign(&self, sig_structure: &[u8]) -> Result<Signature, SignError>;
}
Expand description

Produces the signature over Sig_structure bytes.

The broker backs this with sign-in-place (Ed25519 transit accepts the full arbitrary-length structure); clients use local keys.

Required Methods§

Source

fn key_id(&self) -> &KeyId

The signing key id; becomes the outer kid.

Source

fn algorithm(&self) -> SignatureAlgorithm

The signature algorithm this signer produces.

Source

async fn sign(&self, sig_structure: &[u8]) -> Result<Signature, SignError>

Sign the exact Sig_structure bytes.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§