Struct lamport::PrivateKey
[−]
[src]
pub struct PrivateKey<T: Digest + Clone> { /* fields omitted */ }
A one-time signing private key
Methods
impl<T: Digest + Clone> PrivateKey<T>
[src]
fn new(digest: T) -> PrivateKey<T>
Generates a new random one-time signing key. This method can panic if OS RNG fails
fn public_key(&self) -> PublicKey<T>
Returns the public key associated with this private key
fn sign(&mut self, data: &[u8]) -> Result<Vec<Vec<u8>>, &'static str>
Signs the data with the private key and returns the result if successful. If unsuccesful, an explanation string is returned