读取自定义KEY/IV

This commit is contained in:
nilaoda 2022-09-17 10:19:57 +08:00
parent 78a07e20ce
commit c681a2997f
1 changed files with 9 additions and 1 deletions

View File

@ -32,11 +32,19 @@ namespace N_m3u8DL_RE.Parser.Processor.HLS
{
encryptInfo.IV = HexUtil.HexToBytes(iv);
}
if (parserConfig.CustomeIV != null)
{
encryptInfo.IV = parserConfig.CustomeIV;
}
//KEY
try
{
if (uri.ToLower().StartsWith("base64:"))
if (parserConfig.CustomeKey != null)
{
encryptInfo.Key = parserConfig.CustomeKey;
}
else if (uri.ToLower().StartsWith("base64:"))
{
encryptInfo.Key = Convert.FromBase64String(uri[7..]);
}