pub mod certificate;
mod checked;
pub mod key;
pub mod lookup;
pub mod merge;
pub mod message;
pub mod model;
pub mod policy;
mod primary_userid;
pub mod signature;
pub mod tsk;
pub mod util;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const RPGP_VERSION: &str = pgp::VERSION;
#[derive(thiserror::Error, Debug)]
#[non_exhaustive]
pub enum Error {
#[error("rPGP error: {0}")]
Rpgp(#[from] pgp::errors::Error),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Internal error: {0}")]
Message(String),
#[error("Primary key invalid: No valid binding signature found")]
InvalidPrimary,
}
impl From<pgp::composed::SubkeyParamsBuilderError> for Error {
fn from(value: pgp::composed::SubkeyParamsBuilderError) -> Self {
Error::Message(format!("SubkeyParamsBuilderError: {value}"))
}
}
impl From<pgp::composed::SecretKeyParamsBuilderError> for Error {
fn from(value: pgp::composed::SecretKeyParamsBuilderError) -> Self {
Error::Message(format!("SecretKeyParamsBuilderError: {value}"))
}
}