blob: 9a497f9a6a274b99f45f56af8f395823f9bd171f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//! Asymmetric crypto operations.
use packet::Key;
use crypto::mpis;
use constants::HashAlgorithm;
use Result;
/// Creates a signature.
pub trait Signer {
/// Returns a reference to the public key.
fn public(&self) -> &Key;
/// Creates a signature over the `digest` produced by `hash_algo`.
fn sign(&mut self, hash_algo: HashAlgorithm, digest: &[u8])
-> Result<mpis::Signature>;
}
|