mirror of
https://github.com/chris124567/hulu
synced 2024-11-21 23:57:30 +00:00
represent private key with byte slice
This commit is contained in:
parent
8c095fc96a
commit
9bcd331a50
@ -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
Loading…
Reference in New Issue
Block a user