Trait askar_crypto::sign::KeySign[][src]

pub trait KeySign: KeySigVerify {
    fn write_signature(
        &self,
        message: &[u8],
        sig_type: Option<SignatureType>,
        out: &mut dyn WriteBuffer
    ) -> Result<(), Error>; fn create_signature(
        &self,
        message: &[u8],
        sig_type: Option<SignatureType>
    ) -> Result<SecretBytes, Error> { ... } }
Expand description

Signature creation operations

Required methods

fn write_signature(
    &self,
    message: &[u8],
    sig_type: Option<SignatureType>,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

Expand description

Create a signature of the requested type and write it to the provided buffer.

Loading content...

Provided methods

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

This is supported on crate feature alloc only.
Expand description

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

Loading content...

Implementors

impl KeySign for Ed25519KeyPair[src]

This is supported on crate feature ed25519 only.

fn write_signature(
    &self,
    message: &[u8],
    sig_type: Option<SignatureType>,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

impl KeySign for K256KeyPair[src]

This is supported on crate feature k256 only.

fn write_signature(
    &self,
    message: &[u8],
    sig_type: Option<SignatureType>,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

impl KeySign for P256KeyPair[src]

This is supported on crate feature p256 only.

fn write_signature(
    &self,
    message: &[u8],
    sig_type: Option<SignatureType>,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

impl KeySign for AnyKey[src]

fn write_signature(
    &self,
    message: &[u8],
    sig_type: Option<SignatureType>,
    out: &mut dyn WriteBuffer
) -> Result<(), Error>
[src]

Loading content...