support encrypted streams with SRTP and MIKEY (#520) (#809)

This commit is contained in:
Alessandro Ros
2025-07-05 12:48:13 +02:00
committed by GitHub
parent a5ff92f130
commit 616fa7ea89
104 changed files with 4179 additions and 766 deletions

20
pkg/mikey/payload.go Normal file
View File

@@ -0,0 +1,20 @@
package mikey
type payloadType uint8
// RFC3830, table 6.1.b
const (
payloadTypeKEMAC payloadType = 1
payloadTypeT payloadType = 5
payloadTypeSP payloadType = 10
payloadTypeRAND payloadType = 11
payloadTypeKeyData payloadType = 20
)
// Payload is a MIKEY payload.
type Payload interface {
unmarshal(buf []byte) (int, error)
typ() payloadType
marshalSize() int
marshalTo(buf []byte) (int, error)
}