Trait flow_sdk::algorithms::FlowSigner[][src]

pub trait FlowSigner {
    type Algorithm: SignatureAlgorithm;
    type SecretKey: Clone;
    type PublicKey: Copy;
    type Signature: Signature;
    fn new() -> Self;
fn sign_populated(
        &self,
        hashed: [u8; 32],
        secret_key: &Self::SecretKey
    ) -> Self::Signature;
fn to_public_key(&self, secret_key: &Self::SecretKey) -> Self::PublicKey;
fn serialize_public_key(&self, public_key: &Self::PublicKey) -> [u8; 64]; fn sign(
        &self,
        hasher: impl FlowHasher,
        secret_key: &Self::SecretKey
    ) -> Self::Signature { ... } }
Expand description

A signature signer.

Associated Types

The algorithm of this signer.

The secret key used by this signer.

The public key used by this signer.

The signature type produced by this signer.

Required methods

Creates a new signer.

Signs a 256 bit hashed data with the secret key.

Converts a secret key to its public counterpart.

Serializes a public key. Excluding the leading 0x04.

Provided methods

Creates a signature by consuming a populated hasher and a secret key.

Implementors