Trait Signable

Source
pub trait Signable: Digestible {
    type SignedType: Signatures;

    // Required method
    fn with_signature(
        self,
        ec_signature: Ed25519Signature,
        pq_signature: FnDsaSignature,
    ) -> Self::SignedType;

    // Provided method
    fn context() -> &'static [u8]  { ... }
}
Expand description

Sign and convert to the respective signed variant.

This trait extends Digestible to provide signing functionality, allowing a type to be converted into a signed version of itself.

Required Associated Types§

Source

type SignedType: Signatures

The type that results from signing this data structure.

Required Methods§

Source

fn with_signature( self, ec_signature: Ed25519Signature, pq_signature: FnDsaSignature, ) -> Self::SignedType

Combine this with signatures to create the signed variant.

Provided Methods§

Source

fn context() -> &'static [u8]

Return the signing context for domain separation.

Uses the type name of the signed type to ensure different data structures have different signing domains.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§