playReady

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: OSL-3.0 Imports: 17 Imported by: 1

README

playReady

When I was in college studying classical music, I heard someone in the practice room next to me playing the same Brahms sonata—but playing it better than me. It was one of those moments where I was like, “Well, I’m not gonna be the best Brahms Interpreter.” But I can be the best interpreter of my music. That’s what I strive for.

Kelly Moran - Helix (Edit)

https://wikipedia.org/wiki/PlayReady

Microsoft Edge

  1. Settings and more
  2. Settings
  3. Privacy, search, and services
  4. Clear browsing data, Clear browsing data now, Choose what to clear
  5. Time range, all time
  6. Cookies and other site data, Cached images and files
  7. Clear now

then:

  1. edge://flags
  2. search DRM
  3. Widevine DRM
    • disabled
  4. bitmovin.com/demos/drm

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UuidOrGuid

func UuidOrGuid(data []byte)

Types

type AuxKey

type AuxKey struct {
	Location uint32
	Key      [16]byte
}

type AuxKeys

type AuxKeys struct {
	Count uint16
	Keys  []AuxKey
}

type CertFeatures

type CertFeatures struct {
	Entries  uint32
	Features []uint32
}

func (*CertFeatures) Append

func (c *CertFeatures) Append(data []byte) []byte

func (*CertFeatures) New

func (c *CertFeatures) New(Type uint32)

type CertSignature

type CertSignature struct {
	SignatureType   uint16
	SignatureLength uint16
	// The actual signature bytes
	Signature    []byte
	IssuerLength uint32
	// The public key of the issuer that signed this certificate
	IssuerKey []byte
}

func (*CertSignature) New

func (c *CertSignature) New(signature, modelKey []byte) error

type Certificate

type Certificate struct {
	Magic             [4]byte          // 0:4
	Version           uint32           // 4:8
	Length            uint32           // 8:12
	LengthToSignature uint32           // 12:16
	Info              *CertificateInfo // 0x1
	Security          *Ftlv            // 0x11
	Features          *Ftlv            // 0x5
	KeyInfo           *KeyInfo         // 0x6
	Manufacturer      *Ftlv            // 0x7
	Signature         *CertSignature   // 0x8
}

func (*Certificate) Append

func (c *Certificate) Append(data []byte) []byte

type CertificateInfo

type CertificateInfo struct {
	CertificateId [16]byte
	SecurityLevel uint32
	Flags         uint32
	InfoType      uint32
	Digest        [32]byte
	Expiry        uint32
	ClientId      [16]byte // Client ID (can be used for license binding)
}

func (*CertificateInfo) New

func (c *CertificateInfo) New(securityLevel uint32, digest []byte)

type Chain

type Chain struct {
	Magic        [4]byte
	Version      uint32
	Length       uint32
	Flags        uint32
	CertCount    uint32
	Certificates []Certificate
}

func (*Chain) Decode

func (c *Chain) Decode(data []byte) error

Decode decodes a byte slice into the Chain structure.

func (*Chain) Encode

func (c *Chain) Encode() []byte

func (*Chain) Leaf

func (c *Chain) Leaf(modelPriv, encryptSignPriv *big.Int) error

they downgrade certs from the cert digest (hash of the signing key)

func (*Chain) RequestBody

func (c *Chain) RequestBody(kid []byte, privK *big.Int) ([]byte, error)

type ContentKey

type ContentKey struct {
	KeyId      [16]byte
	KeyType    uint16
	CipherType uint16
	Length     uint16
	Value      []byte
}

type CoordX

type CoordX [32]byte

func (*CoordX) Key

func (c *CoordX) Key() []byte

func (*CoordX) New

func (c *CoordX) New(x *big.Int)

type EccKey

type EccKey struct {
	Curve  uint16
	Length uint16
	Value  []byte
}

type Ftlv

type Ftlv struct {
	Flag   uint16 // this can be 0 or 1
	Type   uint16
	Length uint32
	Value  []byte
}

func (*Ftlv) Append

func (f *Ftlv) Append(data []byte) []byte

type KeyData

type KeyData struct {
	KeyType   uint16
	Length    uint16
	Flags     uint32
	PublicKey [64]byte // ECDSA P256 public key (X and Y coordinates)
	Usage     CertFeatures
}

func (*KeyData) Append

func (k *KeyData) Append(data []byte) []byte

func (*KeyData) New

func (k *KeyData) New(PublicKey []byte, Type uint32)

type KeyInfo

type KeyInfo struct {
	Entries uint32 // can be 1 or 2
	Keys    []KeyData
}

func (*KeyInfo) New

func (k *KeyInfo) New(encryptSignKey []byte)

type License

type License struct {
	Magic      [4]byte           // 0
	Offset     uint16            // 1
	Version    uint16            // 2
	RightsId   [16]byte          // 3
	ContentKey *ContentKey       // 4.9.10
	EccKey     *EccKey           // 4.9.42
	AuxKeys    *AuxKeys          // 4.9.81
	Signature  *LicenseSignature // 4.11
}

func (*License) Decrypt

func (l *License) Decrypt(data []byte, privK *big.Int) (*CoordX, error)

type LicenseSignature

type LicenseSignature struct {
	Type   uint16
	Length uint16
	Data   []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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