mirror of
https://github.com/aaru-dps/Aaru.Decryption.git
synced 2025-12-16 19:24:33 +00:00
Conditional access is known to be not null.
This commit is contained in:
@@ -379,8 +379,8 @@ namespace Aaru.Decryption.DVD
|
|||||||
/// <returns>A DiscKey struct with the decoded key.</returns>
|
/// <returns>A DiscKey struct with the decoded key.</returns>
|
||||||
public static CSS_CPRM.DiscKey? DecodeDiscKey(byte[] response, byte[] busKey)
|
public static CSS_CPRM.DiscKey? DecodeDiscKey(byte[] response, byte[] busKey)
|
||||||
{
|
{
|
||||||
if(response?.Length != 2052 ||
|
if(response.Length != 2052 ||
|
||||||
busKey?.Length != 5)
|
busKey.Length != 5)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
byte[] key = response.Skip(4).Take(2048).ToArray();
|
byte[] key = response.Skip(4).Take(2048).ToArray();
|
||||||
@@ -406,8 +406,8 @@ namespace Aaru.Decryption.DVD
|
|||||||
/// <returns>A TitleKey struct with the decoded key.</returns>
|
/// <returns>A TitleKey struct with the decoded key.</returns>
|
||||||
public static CSS_CPRM.TitleKey? DecodeTitleKey(byte[] response, byte[] busKey)
|
public static CSS_CPRM.TitleKey? DecodeTitleKey(byte[] response, byte[] busKey)
|
||||||
{
|
{
|
||||||
if(response?.Length != 12 ||
|
if(response.Length != 12 ||
|
||||||
busKey?.Length != 5)
|
busKey.Length != 5)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
byte[] key = response.Skip(5).Take(5).ToArray();
|
byte[] key = response.Skip(5).Take(5).ToArray();
|
||||||
|
|||||||
Reference in New Issue
Block a user