func BuildSignedMessage(msg []byte, privateKey *rsa.PrivateKey) ([]byte, error)
BuildSignedMessage envelopes the request with an RSA signature.
func GetKey(keys []*KeyContainer, id []byte) ([]byte, bool)
func ParsePrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)
type KeyContainer struct { Id []byte Iv []byte Key []byte }
func ParseLicenseResponse(responseData []byte, originalRequestBytes []byte, privateKey *rsa.PrivateKey) ([]*KeyContainer, error)
LicenseError reflects the structure of the Widevine LicenseError protobuf.
type LicenseError struct { ErrorCode *protobuf.Field }
func (le *LicenseError) Error() string
Error implements the standard Go error interface.
PsshData represents the Widevine-specific protobuf message.
type PsshData struct { KeyIds [][]byte ContentId []byte }
func (p *PsshData) BuildLicenseRequest(clientId []byte) ([]byte, error)
BuildLicenseRequest creates and serializes a LicenseRequest protobuf message.
func (p *PsshData) Marshal() ([]byte, error)
Marshal serializes the PsshData struct into the protobuf wire format.
func (p *PsshData) Unmarshal(data []byte) error
Unmarshal parses the protobuf wire format into the PsshData struct.