pub mod config;
pub mod decryptor;
pub mod digest;
pub mod encryptor;
pub mod error;
pub mod keys;
pub mod signer;
pub mod verifier;
pub use config::CryptoConfig;
pub use decryptor::SamlDecryptor;
pub use encryptor::SamlEncryptor;
pub use error::CryptoError;
pub use signer::SamlSigner;
pub use verifier::SamlVerifier;
pub use bergshamra_c14n::{self, C14nMode};
pub use bergshamra_dsig::{VerifiedKeyInfo, VerifiedReference, VerifyResult};
pub use bergshamra_keys::{build_x509_key_info, build_x509_key_info_from_der};
pub use bergshamra_keys::{Key, KeyData, KeyUsage, KeysManager};
pub fn canonicalize(
xml: &str,
mode: C14nMode,
inclusive_prefixes: &[String],
) -> Result<Vec<u8>, CryptoError> {
Ok(bergshamra_c14n::canonicalize(
xml,
mode,
None,
inclusive_prefixes,
)?)
}
pub fn exc_c14n(xml: &str, inclusive_prefixes: &[String]) -> Result<Vec<u8>, CryptoError> {
canonicalize(xml, C14nMode::Exclusive, inclusive_prefixes)
}