diff --git a/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSKeyProcessor.cs b/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSKeyProcessor.cs index e3f8c8d..128b5b8 100644 --- a/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSKeyProcessor.cs +++ b/src/N_m3u8DL-RE.Parser/Processor/HLS/DefaultHLSKeyProcessor.cs @@ -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..]); }