Documentation ¶
Overview ¶
Package crypto provides SRT cryptography
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidKey = errors.New("crypto: invalid key for encryption. Must be even, odd, or both")
ErrInvalidKey is returned when the packet encryption is invalid
View Source
var ErrInvalidWrap = errors.New("crypto: the un/wrapped key has the wrong length")
ErrInvalidWrap is returned when the packet encryption indicates a different length of the wrapped key
Functions ¶
This section is empty.
Types ¶
type Crypto ¶
type Crypto interface { // Generate generates an even or odd SEK. GenerateSEK(key packet.PacketEncryption) error // UnmarshalMK unwraps the key with the passphrase in a Key Material Extension Message. If the passphrase // is wrong an error is returned. UnmarshalKM(km *packet.CIFKeyMaterialExtension, passphrase string) error // MarshalKM wraps the key with the passphrase and the odd/even SEK for a Key Material Extension Message. MarshalKM(km *packet.CIFKeyMaterialExtension, passphrase string, key packet.PacketEncryption) error // EncryptOrDecryptPayload encrypts or decrypts the data of a packet with an even or odd SEK and // the sequence number. EncryptOrDecryptPayload(data []byte, key packet.PacketEncryption, packetSequenceNumber uint32, decrypt bool) error }
Crypto implements the SRT data encryption and decryption.
Click to show internal directories.
Click to hide internal directories.