//! Types for signatures.
use std::fmt;
use std::ops::Deref;
use constants::Curve;
use Error;
use Result;
use crypto::{
mpis::{self, MPI},
Signer,
};
use HashAlgorithm;
use PublicKeyAlgorithm;
use SignatureType;
use packet::Key;
use KeyID;
use packet::UserID;
use packet::UserAttribute;
use Packet;
use packet;
use packet::signature::subpacket::SubpacketArea;
use serialize::Serialize;
use nettle::{dsa, ecdsa, ed25519, Hash, rsa, Yarrow};
use nettle::rsa::verify_digest_pkcs1;
#[cfg(test)]
use std::path::PathBuf;
pub mod subpacket;
const TRACE : bool = false;
#[cfg(test)]
#[allow(dead_code)]
fn path_to(artifact: &str) -> PathBuf {
[env!("CARGO_MANIFEST_DIR"), "tests", "data", artifact]
.iter().collect()
}
/// Builds a signature packet.
///
/// This is the mutable version of a `Signature` packet. To convert
/// it to one, use `sign_hash(..)`.
#[derive(Clone, Hash, PartialEq, Eq)]
pub struct Builder {
/// Version of the signature packet. Must be 4.