Trait openmls::ciphersuite::signable::Signable
source · pub trait Signable: Sized {
type SignedOutput;
// Required methods
fn unsigned_payload(&self) -> Result<Vec<u8>, Error>;
fn label(&self) -> &str;
// Provided method
fn sign(
self,
signer: &impl Signer
) -> Result<Self::SignedOutput, SignatureError>
where Self::SignedOutput: SignedStruct<Self> { ... }
}
Expand description
The Signable
trait is implemented by all struct that are being signed.
The implementation has to provide the unsigned_payload
function.
Required Associated Types§
sourcetype SignedOutput
type SignedOutput
The type of the object once it’s signed.
Required Methods§
Provided Methods§
sourcefn sign(
self,
signer: &impl Signer
) -> Result<Self::SignedOutput, SignatureError>where
Self::SignedOutput: SignedStruct<Self>,
fn sign( self, signer: &impl Signer ) -> Result<Self::SignedOutput, SignatureError>where Self::SignedOutput: SignedStruct<Self>,
Sign the payload with the given private_key
.
Returns a Signature
.