Gridarta Editor
net.sf.gridarta.utils.XteaTest Class Reference
+ Collaboration diagram for net.sf.gridarta.utils.XteaTest:

Public Member Functions

void test ()
 

Static Private Attributes

static final byte[] IPHERTEXT = { (byte) 0x06, (byte) 0x6a, (byte) 0xb0, (byte) 0x51, (byte) 0xf8, (byte) 0xa7, (byte) 0xa3, (byte) 0xc3 }
 
static final byte[] KEY = { (byte) 0x12, (byte) 0x34, (byte) 0x56, (byte) 0x78, (byte) 0x9a, (byte) 0xbc, (byte) 0xde, (byte) 0xf0, (byte) 0x01, (byte) 0x23, (byte) 0x45, (byte) 0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef }
 
static final byte[] PLAINTEXT = { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x06, (byte) 0x07, (byte) 0x08 }
 

Detailed Description

Regression tests for Xtea.

Author
Andreas Kirschbaum

Definition at line 31 of file XteaTest.java.

Member Function Documentation

◆ test()

void net.sf.gridarta.utils.XteaTest.test ( )

Checks that basic encryption and decryption works.

Definition at line 53 of file XteaTest.java.

References net.sf.gridarta.utils.Xtea.decrypt(), net.sf.gridarta.utils.Xtea.encrypt(), net.sf.gridarta.utils.XteaTest.IPHERTEXT, net.sf.gridarta.utils.XteaTest.KEY, and net.sf.gridarta.utils.XteaTest.PLAINTEXT.

+ Here is the call graph for this function:

Member Data Documentation

◆ IPHERTEXT

final byte [] net.sf.gridarta.utils.XteaTest.IPHERTEXT = { (byte) 0x06, (byte) 0x6a, (byte) 0xb0, (byte) 0x51, (byte) 0xf8, (byte) 0xa7, (byte) 0xa3, (byte) 0xc3 }
staticprivate

The expected ciphertext corresponding to KEY and {}.

Definition at line 47 of file XteaTest.java.

Referenced by net.sf.gridarta.utils.XteaTest.test().

◆ KEY

final byte [] net.sf.gridarta.utils.XteaTest.KEY = { (byte) 0x12, (byte) 0x34, (byte) 0x56, (byte) 0x78, (byte) 0x9a, (byte) 0xbc, (byte) 0xde, (byte) 0xf0, (byte) 0x01, (byte) 0x23, (byte) 0x45, (byte) 0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef }
staticprivate

The key for the test.

Definition at line 36 of file XteaTest.java.

Referenced by net.sf.gridarta.utils.XteaTest.test().

◆ PLAINTEXT

final byte [] net.sf.gridarta.utils.XteaTest.PLAINTEXT = { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x06, (byte) 0x07, (byte) 0x08 }
staticprivate

The plaintext for the test.

Definition at line 41 of file XteaTest.java.

Referenced by net.sf.gridarta.utils.XteaTest.test().


The documentation for this class was generated from the following file: