1
0
mirror of https://github.com/chris124567/hulu synced 2024-11-24 17:17:30 +00:00

represent private key with byte slice

This commit is contained in:
Christopher Tarry 2022-05-14 15:06:52 -04:00
parent 8c095fc96a
commit 9bcd331a50
2 changed files with 4 additions and 4 deletions

View File

@ -35,8 +35,8 @@ type Key struct {
}
// Creates a new CDM object with the specified device information.
func NewCDM(privateKey string, clientID []byte, initData []byte) (CDM, error) {
block, _ := pem.Decode([]byte(privateKey))
func NewCDM(privateKey, clientID, initData []byte) (CDM, error) {
block, _ := pem.Decode(privateKey)
if block == nil || (block.Type != "PRIVATE KEY" && block.Type != "RSA PRIVATE KEY") {
return CDM{}, errors.New("failed to decode device private key")
}

File diff suppressed because one or more lines are too long