#![doc = include_str!("../README.md")]
use std::fmt;
#[derive(Debug, PartialEq)]
pub enum SrtpError {
Encryption,
Authentication,
ContextNotReady,
InvalidKeySize,
TransformDispatch,
KdfDispatch,
InvalidPacket,
InvalidProfile,
InvalidPacketIndex,
InvalidMki,
StreamNotFound,
KeyLimit {
is_rtp: bool,
is_dead: bool,
mki: Option<Vec<u8>>,
ssrc: u32,
},
}
impl fmt::Display for SrtpError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{:?}", self)
}
}
impl std::error::Error for SrtpError {}
mod header;
mod key_derivation;
mod protection_profile;
mod replay;
mod session;
mod stream;
mod transform;
pub use protection_profile::ProtectionProfile;
pub use session::{RecvSession, SendSession, Session};
pub use stream::{MasterKey, StreamConfig};