KeySign

Trait KeySign 

Source
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§

Source

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§

Source

fn create_signature( &self, message: &[u8], sig_type: Option<SignatureType>, ) -> Result<SecretBytes, Error>

Available on crate feature alloc only.

Create a signature of the requested type and return an allocated buffer.

Implementors§

Source§

impl KeySign for Ed25519KeyPair

Available on crate feature ed25519 only.
Source§

impl KeySign for K256KeyPair

Available on crate feature k256 only.
Source§

impl KeySign for P256KeyPair

Available on crate features p256 or p256_hardware only.
Source§

impl KeySign for P384KeyPair

Available on crate feature p384 only.
Source§

impl KeySign for AnyKey

Available on crate feature any_key only.