pub trait KeySign: KeySigVerify {
// Required method
fn write_signature(
&self,
message: &[u8],
sig_type: Option<SignatureType>,
out: &mut dyn WriteBuffer,
) -> Result<(), Error>;
// Provided method
fn create_signature(
&self,
message: &[u8],
sig_type: Option<SignatureType>,
) -> Result<SecretBytes, Error> { ... }
}Expand description
Signature creation operations
Required Methods§
Sourcefn write_signature(
&self,
message: &[u8],
sig_type: Option<SignatureType>,
out: &mut dyn WriteBuffer,
) -> Result<(), Error>
fn write_signature( &self, message: &[u8], sig_type: Option<SignatureType>, out: &mut dyn WriteBuffer, ) -> Result<(), Error>
Create a signature of the requested type and write it to the provided buffer.
Provided Methods§
Sourcefn create_signature(
&self,
message: &[u8],
sig_type: Option<SignatureType>,
) -> Result<SecretBytes, Error>
Available on crate feature alloc only.
fn create_signature( &self, message: &[u8], sig_type: Option<SignatureType>, ) -> Result<SecretBytes, Error>
alloc only.Create a signature of the requested type and return an allocated buffer.
Implementors§
impl KeySign for Ed25519KeyPair
Available on crate feature
ed25519 only.impl KeySign for K256KeyPair
Available on crate feature
k256 only.impl KeySign for P256KeyPair
Available on crate features
p256 or p256_hardware only.impl KeySign for P384KeyPair
Available on crate feature
p384 only.impl KeySign for AnyKey
Available on crate feature
any_key only.