#![forbid(unsafe_code)]
pub mod cipher;
pub mod digest;
pub mod kdf;
pub mod keyagreement;
pub mod keytransport;
pub mod keywrap;
pub mod registry;
pub mod sign;
pub use digest::DigestAlgorithm;
pub use registry::AlgorithmRegistry;
pub(crate) fn map_kryptering_err(e: kryptering::Error) -> bergshamra_core::Error {
match e {
kryptering::Error::Crypto(s) => bergshamra_core::Error::Crypto(s),
kryptering::Error::UnsupportedAlgorithm(s) => {
bergshamra_core::Error::UnsupportedAlgorithm(s)
}
kryptering::Error::Key(s) => bergshamra_core::Error::Key(s),
kryptering::Error::Io(e) => bergshamra_core::Error::Io(e),
#[allow(unreachable_patterns)]
other => bergshamra_core::Error::Crypto(other.to_string()),
}
}