11using System ;
22using System . IO ;
33using SabreTools . IO . Extensions ;
4- using SabreTools . Matching ;
54
65namespace NDecrypt . Core
76{
@@ -284,7 +283,7 @@ private void ValidateKeys()
284283 {
285284 using var hasher = System . Security . Cryptography . SHA512 . Create ( ) ;
286285 byte [ ] actual = hasher . ComputeHash ( NitroEncryptionData ) ;
287- if ( ! Extensions . EqualsExactly ( ExpectedNitroSha512Hash , actual ) )
286+ if ( ! actual . EqualsExactly ( ExpectedNitroSha512Hash ) )
288287 {
289288 Console . WriteLine ( $ "NitroEncryptionData invalid value, disabling...") ;
290289 NitroEncryptionData = [ ] ;
@@ -296,7 +295,7 @@ private void ValidateKeys()
296295 {
297296 var cipher = CommonOperations . CreateAESEncryptionCipher ( KeyX0x18 , TestIV ) ;
298297 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
299- if ( ! Extensions . EqualsExactly ( ExpectedKeyX0x18 , actual ) )
298+ if ( ! actual . EqualsExactly ( ExpectedKeyX0x18 ) )
300299 {
301300 Console . WriteLine ( $ "KeyX0x18 invalid value, disabling...") ;
302301 KeyX0x18 = [ ] ;
@@ -308,7 +307,7 @@ private void ValidateKeys()
308307 {
309308 var cipher = CommonOperations . CreateAESEncryptionCipher ( DevKeyX0x18 , TestIV ) ;
310309 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
311- if ( ! Extensions . EqualsExactly ( ExpectedDevKeyX0x18 , actual ) )
310+ if ( ! actual . EqualsExactly ( ExpectedDevKeyX0x18 ) )
312311 {
313312 Console . WriteLine ( $ "DevKeyX0x18 invalid value, disabling...") ;
314313 DevKeyX0x18 = [ ] ;
@@ -320,7 +319,7 @@ private void ValidateKeys()
320319 {
321320 var cipher = CommonOperations . CreateAESEncryptionCipher ( KeyX0x1B , TestIV ) ;
322321 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
323- if ( ! Extensions . EqualsExactly ( ExpectedKeyX0x1B , actual ) )
322+ if ( ! actual . EqualsExactly ( ExpectedKeyX0x1B ) )
324323 {
325324 Console . WriteLine ( $ "KeyX0x1B invalid value, disabling...") ;
326325 KeyX0x1B = [ ] ;
@@ -332,7 +331,7 @@ private void ValidateKeys()
332331 {
333332 var cipher = CommonOperations . CreateAESEncryptionCipher ( DevKeyX0x1B , TestIV ) ;
334333 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
335- if ( ! Extensions . EqualsExactly ( ExpectedDevKeyX0x1B , actual ) )
334+ if ( ! actual . EqualsExactly ( ExpectedDevKeyX0x1B ) )
336335 {
337336 Console . WriteLine ( $ "DevKeyX0x1B invalid value, disabling...") ;
338337 DevKeyX0x1B = [ ] ;
@@ -344,7 +343,7 @@ private void ValidateKeys()
344343 {
345344 var cipher = CommonOperations . CreateAESEncryptionCipher ( KeyX0x25 , TestIV ) ;
346345 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
347- if ( ! Extensions . EqualsExactly ( ExpectedKeyX0x25 , actual ) )
346+ if ( ! actual . EqualsExactly ( ExpectedKeyX0x25 ) )
348347 {
349348 Console . WriteLine ( $ "KeyX0x25 invalid value, disabling...") ;
350349 KeyX0x25 = [ ] ;
@@ -356,7 +355,7 @@ private void ValidateKeys()
356355 {
357356 var cipher = CommonOperations . CreateAESEncryptionCipher ( DevKeyX0x25 , TestIV ) ;
358357 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
359- if ( ! Extensions . EqualsExactly ( ExpectedDevKeyX0x25 , actual ) )
358+ if ( ! actual . EqualsExactly ( ExpectedDevKeyX0x25 ) )
360359 {
361360 Console . WriteLine ( $ "DevKeyX0x25 invalid value, disabling...") ;
362361 DevKeyX0x25 = [ ] ;
@@ -368,7 +367,7 @@ private void ValidateKeys()
368367 {
369368 var cipher = CommonOperations . CreateAESEncryptionCipher ( KeyX0x2C , TestIV ) ;
370369 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
371- if ( ! Extensions . EqualsExactly ( ExpectedKeyX0x2C , actual ) )
370+ if ( ! actual . EqualsExactly ( ExpectedKeyX0x2C ) )
372371 {
373372 Console . WriteLine ( $ "KeyX0x2C invalid value, disabling...") ;
374373 KeyX0x2C = [ ] ;
@@ -380,7 +379,7 @@ private void ValidateKeys()
380379 {
381380 var cipher = CommonOperations . CreateAESEncryptionCipher ( DevKeyX0x2C , TestIV ) ;
382381 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
383- if ( ! Extensions . EqualsExactly ( ExpectedDevKeyX0x2C , actual ) )
382+ if ( ! actual . EqualsExactly ( ExpectedDevKeyX0x2C ) )
384383 {
385384 Console . WriteLine ( $ "DevKeyX0x2C invalid value, disabling...") ;
386385 DevKeyX0x2C = [ ] ;
0 commit comments