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.
Required methods
Signs a 256 bit hashed data with the secret key.
fn to_public_key(&self, secret_key: &Self::SecretKey) -> Self::PublicKey
fn to_public_key(&self, secret_key: &Self::SecretKey) -> Self::PublicKey
Converts a secret key to its public counterpart.
Provided methods
fn sign(
&self,
hasher: impl FlowHasher,
secret_key: &Self::SecretKey
) -> Self::Signature
fn sign(
&self,
hasher: impl FlowHasher,
secret_key: &Self::SecretKey
) -> Self::Signature
Creates a signature by consuming a populated hasher and a secret key.