#![allow(missing_docs)]
pub use crate::archive::format::{parse_fca_header, parse_manifest_bytes};
pub use crate::archive::model::{ArchiveEntry, ArchiveEntryKind, FcaHeader, Manifest};
pub use crate::archive::path::{ascii_case_collision_key, validate_fca_path};
pub use crate::crypto::kdf::{KDF_PARAMS_SIZE, KdfParams};
pub use crate::crypto::tlv::validate_tlv;
pub use crate::key::private::PrivateKeyHeader;
pub use crate::key::public::RECIPIENT_STRING_LEN_LOCAL_CAP_DEFAULT;
pub use crate::recipient::native::x25519::validate_private_key_shape;
pub use crate::HeaderReadLimits;
pub fn read_encrypted_header<R: std::io::Read>(
reader: &mut R,
limits: HeaderReadLimits,
) -> Result<(), crate::CryptoError> {
crate::container::read_encrypted_header(reader, limits).map(|_| ())
}
pub fn validate_no_known_critical(
bytes: &[u8],
max_region_len: u32,
max_value_len: u32,
) -> Result<(), crate::CryptoError> {
crate::crypto::tlv::validate_no_known_critical(bytes, max_region_len, max_value_len)
}
pub fn decode_recipient_string(s: &str, local_max_chars: usize) -> Result<(), crate::CryptoError> {
crate::key::public::decode_recipient_string(s, local_max_chars).map(|_| ())
}
pub use crate::archive::IncompleteOutputPolicy;
pub fn unarchive_for_fuzz(
bytes: &[u8],
output_dir: &std::path::Path,
limits: crate::ArchiveLimits,
) -> Result<std::path::PathBuf, crate::CryptoError> {
use std::io::Cursor;
crate::archive::unarchive(
Cursor::new(bytes),
output_dir,
limits,
IncompleteOutputPolicy::DeleteOnError,
)
}