#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "alloc")]
mod builders;
mod cbor;
#[cfg(feature = "alloc")]
mod cose;
#[cfg(feature = "alloc")]
mod detailed;
mod error;
#[cfg(feature = "alloc")]
mod headers;
#[cfg(feature = "alloc")]
mod keys;
#[cfg(feature = "alloc")]
mod messages;
mod ser;
mod stream;
mod types;
#[cfg(feature = "alloc")]
pub use builders::{
Encrypt0Builder, EncryptBuilder, Mac0Builder, MacBuilder, Sign1Builder, SignBuilder,
};
pub use cbor::{CborDecoder, CborEncoder, CborItem};
#[cfg(feature = "alloc")]
pub use cose::{
decrypt0_into, decrypt_into, encrypt0_detached_into, encrypt0_into, encrypt0_to_vec,
encrypt_detached_into, encrypt_into, encrypt_to_vec, mac0_into, mac0_to_vec, mac_into,
mac_to_vec, sign1_into, sign1_to_vec, sign_into, sign_to_vec, verify0_into, verify1,
verify_mac, verify_mac0, verify_sign, CoseKey, DecryptOutput, Encrypt0DetachedOutput, Header,
MacVerifyOutput, PayloadMode, Recipient, Signature, VerifyOutput,
};
#[cfg(feature = "alloc")]
pub use detailed::{
from_slice_detailed, CborErrorKind, CoseErrorKind, DetailedError, ErrorContext,
};
pub use error::{Error, Result};
#[cfg(feature = "alloc")]
pub use headers::{HeaderLabel, HeaderMap, HeaderValue, ProtectedHeader, UnprotectedHeader};
#[cfg(feature = "alloc")]
pub use keys::{CoseKeyBuilder, CoseKeyView, SymmetricKey};
#[cfg(feature = "alloc")]
pub use messages::{
CoseEncrypt0Message, CoseEncryptMessage, CoseMac0Message, CoseMacMessage, CoseMessageKind,
CoseSign1Message, CoseSignMessage,
};
pub use ser::{
from_slice, to_slice, ByteStr, CborDeserialize, CborDeserializer, CborSerialize, CborSerializer,
};
#[cfg(feature = "alloc")]
pub use ser::{to_vec, ByteBuf, CborValue};
pub use stream::CborItemReader;
pub use types::{Algorithm, AlgorithmClass, AlgorithmUse, CborMajorType, Curve, KeyType};
#[cfg(feature = "derive")]
pub use wolfcose_derive::{CborDeserialize, CborSerialize};
pub mod raw {
pub use wolfcose_sys::*;
}