Skip to main content

Signable

Trait Signable 

Source
pub trait Signable {
    const DOMAIN_SEPARATOR: [u8; 32];
}
Expand description

Signable types are types that can be signed with ed25519::KeyPair::sign_struct.

Signable types must have a globally unique domain separation value to prevent type confusion attacks. This value is effectively prepended to the signature in order to bind that signature to only this particular type.

Required Associated Constants§

Source

const DOMAIN_SEPARATOR: [u8; 32]

Implementors will only need to fill in this value. An example is array::pad(*b"LEXE-REALM::RootSeed"), used in the RootSeed.

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.

Implementations on Foreign Types§

Source§

impl<T: Signable> Signable for &T

Source§

const DOMAIN_SEPARATOR: [u8; 32] = T::DOMAIN_SEPARATOR

Implementors§