Versions in this module Expand all Collapse all v1 v1.5.2 Aug 28, 2020 Changes in this version + type Config struct + Keys SessionKeys + LocalOptions []ContextOption + LoggerFactory logging.LoggerFactory + Profile ProtectionProfile + RemoteOptions []ContextOption + func (c *Config) ExtractSessionKeysFromDTLS(exporter KeyingMaterialExporter, isClient bool) error + type Context struct + func CreateContext(masterKey, masterSalt []byte, profile ProtectionProfile, opts ...ContextOption) (c *Context, err error) + func (c *Context) DecryptRTCP(dst, encrypted []byte, header *rtcp.Header) ([]byte, error) + func (c *Context) DecryptRTP(dst, encrypted []byte, header *rtp.Header) ([]byte, error) + func (c *Context) EncryptRTCP(dst, decrypted []byte, header *rtcp.Header) ([]byte, error) + func (c *Context) EncryptRTP(dst []byte, plaintext []byte, header *rtp.Header) ([]byte, error) + func (c *Context) Index(ssrc uint32) (uint32, bool) + func (c *Context) ROC(ssrc uint32) (uint32, bool) + func (c *Context) SetIndex(ssrc uint32, index uint32) + func (c *Context) SetROC(ssrc uint32, roc uint32) + type ContextOption func(*Context) error + func SRTCPNoReplayProtection() ContextOption + func SRTCPReplayProtection(windowSize uint) ContextOption + func SRTPNoReplayProtection() ContextOption + func SRTPReplayProtection(windowSize uint) ContextOption + type KeyingMaterialExporter interface + ExportKeyingMaterial func(label string, context []byte, length int) ([]byte, error) + type ProtectionProfile uint16 + const ProtectionProfileAeadAes128Gcm + const ProtectionProfileAes128CmHmacSha1_80 + type ReadStreamSRTCP struct + func (r *ReadStreamSRTCP) Close() error + func (r *ReadStreamSRTCP) GetSSRC() uint32 + func (r *ReadStreamSRTCP) Read(buf []byte) (int, error) + func (r *ReadStreamSRTCP) ReadRTCP(buf []byte) (int, *rtcp.Header, error) + type ReadStreamSRTP struct + func (r *ReadStreamSRTP) Close() error + func (r *ReadStreamSRTP) GetSSRC() uint32 + func (r *ReadStreamSRTP) Read(buf []byte) (int, error) + func (r *ReadStreamSRTP) ReadRTP(buf []byte) (int, *rtp.Header, error) + type SessionKeys struct + LocalMasterKey []byte + LocalMasterSalt []byte + RemoteMasterKey []byte + RemoteMasterSalt []byte + type SessionSRTCP struct + func NewSessionSRTCP(conn net.Conn, config *Config) (*SessionSRTCP, error) + func (s *SessionSRTCP) AcceptStream() (*ReadStreamSRTCP, uint32, error) + func (s *SessionSRTCP) Close() error + func (s *SessionSRTCP) OpenReadStream(SSRC uint32) (*ReadStreamSRTCP, error) + func (s *SessionSRTCP) OpenWriteStream() (*WriteStreamSRTCP, error) + type SessionSRTP struct + func NewSessionSRTP(conn net.Conn, config *Config) (*SessionSRTP, error) + func (s *SessionSRTP) AcceptStream() (*ReadStreamSRTP, uint32, error) + func (s *SessionSRTP) Close() error + func (s *SessionSRTP) OpenReadStream(SSRC uint32) (*ReadStreamSRTP, error) + func (s *SessionSRTP) OpenWriteStream() (*WriteStreamSRTP, error) + type WriteStreamSRTCP struct + func (w *WriteStreamSRTCP) Write(b []byte) (int, error) + func (w *WriteStreamSRTCP) WriteRTCP(header *rtcp.Header, payload []byte) (int, error) + type WriteStreamSRTP struct + func (w *WriteStreamSRTP) Write(b []byte) (int, error) + func (w *WriteStreamSRTP) WriteRTP(header *rtp.Header, payload []byte) (int, error) v1.0.0 Jan 27, 2019