修改 shuffixBuf 匹配方法
This commit is contained in:
parent
dc6f268d74
commit
18eb369de8
@ -140,12 +140,12 @@ func (d *Decoder) searchKey() (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
switch string(bytes.ReplaceAll(suffixBuf, []byte{0x00}, []byte{})) {
|
switch string(suffixBuf) {
|
||||||
case "QTag":
|
case "QTag":
|
||||||
return d.readRawMetaQTag()
|
return d.readRawMetaQTag()
|
||||||
case "STag":
|
case "STag":
|
||||||
return errors.New("qmc: file with 'STag' suffix doesn't contains media key")
|
return errors.New("qmc: file with 'STag' suffix doesn't contains media key")
|
||||||
case "cex":
|
case "cex\x00":
|
||||||
d.decodedKey, err = readKeyFromMMKVCustom(d)
|
d.decodedKey, err = readKeyFromMMKVCustom(d)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
suffix := []byte{0x63, 0x65, 0x78, 0x00} // cex
|
suffix := []byte{0x63, 0x65, 0x78, 0x00} // cex
|
||||||
@ -164,6 +164,7 @@ func (d *Decoder) searchKey() (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user