Substituiton
This commit is contained in:
parent
682cd6f814
commit
0851f73c88
4 changed files with 70 additions and 0 deletions
|
@ -15,4 +15,22 @@ class SPNTest {
|
|||
assertEquals(0xFFFF, spn.k(key, 1));
|
||||
assertEquals(0xFFFF, spn.k(key, 2));
|
||||
}
|
||||
|
||||
@Test
|
||||
void substitution() {
|
||||
var spn = new SPN();
|
||||
|
||||
//given
|
||||
int x = 0xEF45;
|
||||
int r = 0x051C;
|
||||
System.out.print(Integer.toHexString(x));
|
||||
|
||||
//when
|
||||
int y = spn.substitution(x);
|
||||
|
||||
// then
|
||||
assertEquals(r, y);
|
||||
|
||||
// System.out.print(Integer.toHexString(spn.substitution(x)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue