moonbitstack/moonrtc/srtp does not have a README file

    SrtpError

    pub(all) suberror SrtpError {
    InvalidKey
    InvalidPacket
    AuthFailed
    Replay
    } derive(Eq,
    Debug
    )

    impl Show for SrtpError

    Context

    pub struct Context {
    profile :
    Profile

    rtp_keys : SessionKeys
    rtcp_keys : SessionKeys
    tracker :
    SeqTracker

    srtcp_index : UInt
    }

    Context::from_dtls_keys

    fn Context::from_dtls_keys(profile :
    Profile
    , keys :
    Keys
    , is_sender_client : Bool) -> Context raise SrtpError

    Context::new

    fn Context::new(profile :
    Profile
    , master_key : BytesView, master_salt : BytesView) -> Context raise SrtpError

    Context::protect_rtcp

    fn Context::protect_rtcp(self : Context, rtcp_packet : BytesView) -> Bytes raise SrtpError

    Protect an RTCP packet into SRTCP (always encrypted with E-flag set).

    Context::protect_rtp

    fn Context::protect_rtp(self : Context, rtp_packet : BytesView) -> Bytes raise SrtpError

    Protect an RTP packet into SRTP.

    Context::unprotect_rtcp

    fn Context::unprotect_rtcp(self : Context, srtcp_packet : BytesView) -> Bytes raise SrtpError

    Verify and unprotect an SRTCP packet back to plaintext RTCP.

    Context::unprotect_rtp

    fn Context::unprotect_rtp(self : Context, srtp_packet : BytesView) -> Bytes raise SrtpError

    Verify and unprotect an SRTP packet back to plaintext RTP.

    SessionKeys

    pub struct SessionKeys {
    cipher_key : Bytes
    auth_key : Bytes
    cipher_salt : Bytes
    } derive(Eq,
    Debug
    )

    derive_key

    fn derive_key(master_key : BytesView, master_salt : BytesView, label : Byte, out_len : Int) -> Bytes raise SrtpError

    RFC 3711 §4.3.1 AES-CM key derivation PRF (with kdr = 0).

    derive_session_keys

    fn derive_session_keys(profile :
    Profile
    , master_key : BytesView, master_salt : BytesView, is_srtcp? : Bool) -> SessionKeys raise SrtpError

    Source Files