Skip to main content

SignerKey

Trait SignerKey 

Source
pub trait SignerKey:
    Send
    + Sync
    + 'static {
    // Required methods
    fn public_key_bytes(&self) -> Vec<u8> ;
    fn kind(&self) -> SshAlgorithm;
    fn sign(&self, message: &[u8]) -> Result<Vec<u8>, AgentError>;
}
Expand description

A trait implemented by key types that can sign messages and return their public key.

Required Methods§

Source

fn public_key_bytes(&self) -> Vec<u8>

Returns the public key bytes of this key.

Source

fn kind(&self) -> SshAlgorithm

Returns the key kind (i.e., SSH algorithm) of this key.

Source

fn sign(&self, message: &[u8]) -> Result<Vec<u8>, AgentError>

Signs a message and returns the signature bytes.

Implementors§