types

package
v2.16.4 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SDKSalt         = "LKFrameEncryptionKey"
	IVLength        = 12
	PBKDFIterations = 100000
	KeySizeBytes    = 16
	HKDFInfoBytes   = 128
)

Variables

View Source
var (
	ErrIncorrectKeyLength  = errors.New("incorrect key length for encryption/decryption")
	ErrUnableGenerateIV    = errors.New("unable to generate iv for encryption")
	ErrIncorrectIVLength   = errors.New("incorrect iv length")
	ErrBlockCipherRequired = errors.New("input block cipher cannot be nil")
)

Functions

This section is empty.

Types

type FrameDecryptor

type FrameDecryptor interface {
	DecryptFrame(payload []byte) ([]byte, error)
}

FrameDecryptor decrypts a reassembled media frame after RTP depacketization. Returns (nil, nil) for server-injected frames (SIF) that should be dropped.

type FrameEncryptor

type FrameEncryptor interface {
	EncryptFrame(payload []byte) ([]byte, error)
}

FrameEncryptor encrypts a complete media frame (audio or video access unit) before RTP packetization. Implementations are codec-aware: the codec is configured at construction time, not at each call.

type KeyProvider

type KeyProvider interface {
	// GetKey returns the derived AES key for the given index.
	GetKey(keyIndex uint32) ([]byte, error)
	// CurrentKeyIndex returns the active key index for encryption.
	CurrentKeyIndex() uint32
}

KeyProvider manages encryption keys for E2EE.

Jump to

Keyboard shortcuts

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