Skip to main content

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl KeySign for AnyKey

Available on crate feature any_key only.
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_hardware or p256 only.
Source§

impl KeySign for P384KeyPair

Available on crate feature p384 only.