srtp

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: MIT Imports: 7 Imported by: 0 modules, 0 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

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context represents a SRTP cryptographic context Context can only be used for one-way operations it must either used ONLY for encryption or ONLY for decryption

func CreateContext

func CreateContext(masterKey, masterSalt []byte, profile string) (c *Context, err error)

CreateContext creates a new SRTP Context

func (*Context) DecryptRTCP added in v1.1.0

func (c *Context) DecryptRTCP(encrypted []byte) ([]byte, error)

DecryptRTCP decrypts a buffer that contains a RTCP packet We can't pass *rtcp.Packet as the encrypt will obscure significant fields

func (*Context) DecryptRTP added in v1.1.0

func (c *Context) DecryptRTP(packet *rtp.Packet) bool

DecryptRTP decrypts a RTP packet with an encrypted payload

func (*Context) EncryptRTCP added in v1.1.0

func (c *Context) EncryptRTCP(decrypted []byte) ([]byte, error)

EncryptRTCP encrypts a buffer that contains a RTCP packet

func (*Context) EncryptRTP added in v1.1.0

func (c *Context) EncryptRTP(packet *rtp.Packet) bool

EncryptRTP Encrypts a SRTP packet in place

Jump to

Keyboard shortcuts

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