Trait network_clique::crypto::SecretKey
source · pub trait SecretKey: Clone + Send + Sync + 'static {
type Signature: Send + Sync + Clone + Codec;
type PublicKey: PublicKey<Signature = Self::Signature>;
// Required methods
fn sign(&self, message: &[u8]) -> Self::Signature;
fn public_key(&self) -> Self::PublicKey;
}
Expand description
Secret key for signing messages, with an associated public key.
Required Associated Types§
type Signature: Send + Sync + Clone + Codec
type PublicKey: PublicKey<Signature = Self::Signature>
Required Methods§
sourcefn sign(&self, message: &[u8]) -> Self::Signature
fn sign(&self, message: &[u8]) -> Self::Signature
Produce a signature for the provided message.
sourcefn public_key(&self) -> Self::PublicKey
fn public_key(&self) -> Self::PublicKey
Return the associated public key.
Object Safety§
This trait is not object safe.