11using System ;
22using System . IO ;
3+ using SabreTools . IO . Encryption ;
34using SabreTools . IO . Extensions ;
45
56namespace NDecrypt . Core
@@ -293,7 +294,7 @@ private void ValidateKeys()
293294 // KeyX0x18
294295 if ( KeyX0x18 . Length > 0 )
295296 {
296- var cipher = CommonOperations . CreateAESEncryptionCipher ( KeyX0x18 , TestIV ) ;
297+ var cipher = AESCTR . CreateEncryptionCipher ( KeyX0x18 , TestIV ) ;
297298 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
298299 if ( ! actual . EqualsExactly ( ExpectedKeyX0x18 ) )
299300 {
@@ -305,7 +306,7 @@ private void ValidateKeys()
305306 // DevKeyX0x18
306307 if ( DevKeyX0x18 . Length > 0 )
307308 {
308- var cipher = CommonOperations . CreateAESEncryptionCipher ( DevKeyX0x18 , TestIV ) ;
309+ var cipher = AESCTR . CreateEncryptionCipher ( DevKeyX0x18 , TestIV ) ;
309310 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
310311 if ( ! actual . EqualsExactly ( ExpectedDevKeyX0x18 ) )
311312 {
@@ -317,7 +318,7 @@ private void ValidateKeys()
317318 // KeyX0x1B
318319 if ( KeyX0x1B . Length > 0 )
319320 {
320- var cipher = CommonOperations . CreateAESEncryptionCipher ( KeyX0x1B , TestIV ) ;
321+ var cipher = AESCTR . CreateEncryptionCipher ( KeyX0x1B , TestIV ) ;
321322 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
322323 if ( ! actual . EqualsExactly ( ExpectedKeyX0x1B ) )
323324 {
@@ -329,7 +330,7 @@ private void ValidateKeys()
329330 // DevKeyX0x1B
330331 if ( DevKeyX0x1B . Length > 0 )
331332 {
332- var cipher = CommonOperations . CreateAESEncryptionCipher ( DevKeyX0x1B , TestIV ) ;
333+ var cipher = AESCTR . CreateEncryptionCipher ( DevKeyX0x1B , TestIV ) ;
333334 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
334335 if ( ! actual . EqualsExactly ( ExpectedDevKeyX0x1B ) )
335336 {
@@ -341,7 +342,7 @@ private void ValidateKeys()
341342 // KeyX0x25
342343 if ( KeyX0x25 . Length > 0 )
343344 {
344- var cipher = CommonOperations . CreateAESEncryptionCipher ( KeyX0x25 , TestIV ) ;
345+ var cipher = AESCTR . CreateEncryptionCipher ( KeyX0x25 , TestIV ) ;
345346 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
346347 if ( ! actual . EqualsExactly ( ExpectedKeyX0x25 ) )
347348 {
@@ -353,7 +354,7 @@ private void ValidateKeys()
353354 // DevKeyX0x25
354355 if ( DevKeyX0x25 . Length > 0 )
355356 {
356- var cipher = CommonOperations . CreateAESEncryptionCipher ( DevKeyX0x25 , TestIV ) ;
357+ var cipher = AESCTR . CreateEncryptionCipher ( DevKeyX0x25 , TestIV ) ;
357358 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
358359 if ( ! actual . EqualsExactly ( ExpectedDevKeyX0x25 ) )
359360 {
@@ -365,7 +366,7 @@ private void ValidateKeys()
365366 // KeyX0x2C
366367 if ( KeyX0x2C . Length > 0 )
367368 {
368- var cipher = CommonOperations . CreateAESEncryptionCipher ( KeyX0x2C , TestIV ) ;
369+ var cipher = AESCTR . CreateEncryptionCipher ( KeyX0x2C , TestIV ) ;
369370 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
370371 if ( ! actual . EqualsExactly ( ExpectedKeyX0x2C ) )
371372 {
@@ -377,7 +378,7 @@ private void ValidateKeys()
377378 // DevKeyX0x2C
378379 if ( DevKeyX0x2C . Length > 0 )
379380 {
380- var cipher = CommonOperations . CreateAESEncryptionCipher ( DevKeyX0x2C , TestIV ) ;
381+ var cipher = AESCTR . CreateEncryptionCipher ( DevKeyX0x2C , TestIV ) ;
381382 byte [ ] actual = cipher . ProcessBytes ( TestPattern ) ;
382383 if ( ! actual . EqualsExactly ( ExpectedDevKeyX0x2C ) )
383384 {
0 commit comments