@@ -19,6 +19,7 @@ public static IEnumerable<object[]> GetProcessCases()
1919 2 ,
2020 true , string . Empty ,
2121 Helper . HexToBytes ( "9ca0271b64c0e66f" ) ,
22+ Helper . HexToBytes ( "0032153d50cbf924a2ac1dc5f6279436" ) ,
2223 Helper . HexToBytes ( "55f5e848d66586747cc000826d4c0c35" ) ,
2324 327366
2425 } ;
@@ -27,55 +28,56 @@ public static IEnumerable<object[]> GetProcessCases()
2728 "43000130ac71182a748152bb788fb9deb11f2f5a55f5e848d66586747cc000826d4c0c350032153d50cbf924a2ac1dc5f6279436089ca0271b64c0e66f00000000c6fe040000" ,
2829 0 ,
2930 false , "Password length must be at least 1." ,
30- null , null , 0
31+ null , null , null , 0
3132 } ;
3233 yield return new object [ ]
3334 {
3435 "43000130ac71182a748152bb788fb9deb11f2f5a55f5e848d66586747cc000826d4c0c350032153d50cbf924a2ac1dc5f6279436089ca0271b64c0e66f00000000c6fe040000" ,
3536 - 1 ,
3637 false , "Password length must be at least 1." ,
37- null , null , 0
38+ null , null , null , 0
3839 } ;
3940 yield return new object [ ]
4041 {
4142 null ,
4243 2 ,
4344 false , "Input hex can not be null or empty." ,
44- null , null , 0
45+ null , null , null , 0
4546 } ;
4647 yield return new object [ ]
4748 {
4849 "abcx" ,
4950 2 ,
5051 false , "Invalid character \" x\" found at index=3." ,
51- null , null , 0
52+ null , null , null , 0
5253 } ;
5354 yield return new object [ ]
5455 {
5556 "abc" ,
5657 2 ,
5758 false , "Invalid hex string." ,
58- null , null , 0
59+ null , null , null , 0
5960 } ;
6061 yield return new object [ ]
6162 {
6263 "abcd" ,
6364 2 ,
6465 false , "Input hex is expected to be at least 70 bytes but it is 2 bytes." ,
65- null , null , 0
66+ null , null , null , 0
6667 } ;
6768 yield return new object [ ]
6869 {
6970 Helper . GetBytesHex ( 70 ) ,
7071 2 ,
7172 false , "Could not find 0x43000130 in the given hex." ,
72- null , null , 0
73+ null , null , null , 0
7374 } ;
7475 }
7576
7677 [ Theory ]
7778 [ MemberData ( nameof ( GetProcessCases ) ) ]
78- public void ProcessTest ( string hex , int passLength , bool expected , string expError , byte [ ] expSalt , byte [ ] expXor , int expIter )
79+ public void ProcessTest ( string hex , int passLength , bool expected , string expError ,
80+ byte [ ] expSalt , byte [ ] expEncrypted , byte [ ] expXor , int expIter )
7981 {
8082 CorePassSearchSpace searchSpace = new ( ) ;
8183 bool actual = searchSpace . Process ( hex , passLength , out string error ) ;
@@ -87,6 +89,7 @@ public void ProcessTest(string hex, int passLength, bool expected, string expErr
8789 {
8890 Assert . Equal ( searchSpace . PasswordLength , passLength ) ;
8991 Assert . Equal ( searchSpace . Salt , expSalt ) ;
92+ Assert . Equal ( searchSpace . Encrypted , expEncrypted ) ;
9093 Assert . Equal ( searchSpace . XOR , expXor ) ;
9194 Assert . Equal ( searchSpace . Iteration , expIter ) ;
9295 }
0 commit comments