srtp

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 8 Imported by: 4 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSession

func NewSession(log logger.Logger, conn net.Conn, conf *Config) (rtp.Session, error)

Types

type Config

type Config = srtp.Config

type ContextOption

type ContextOption = srtp.ContextOption

func MasterKeyIndicator

func MasterKeyIndicator(mki []byte) ContextOption

Expects a byte slice containing MKI value encoded in big-endian. Will be appended to packets we send.

type Options

type Options struct {
	// Profiles to advertise as our own. Generated with DefaultProfiles if empty.
	// Passing the same set again keeps our master keys stable across re-offers.
	Profiles []Profile
}

Options carries the local SRTP material to use for an offer or an answer.

func (*Options) LocalProfiles

func (o *Options) LocalProfiles() ([]Profile, error)

LocalProfiles returns the profiles from o, generating a fresh set if o is nil or empty.

type Profile

type Profile struct {
	Index    int
	Profile  ProtectionProfile
	Key      []byte
	Salt     []byte
	MKI      []byte // Master Key Identifier, nil if not present
	Lifetime uint64 // TODO: This is just a placeholder for future use
}

func DefaultProfiles

func DefaultProfiles() ([]Profile, error)

type ProtectionProfile

type ProtectionProfile string

func (ProtectionProfile) Parse

type SessionKeys

type SessionKeys = srtp.SessionKeys

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL