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

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