|
|
@ -7,10 +7,8 @@ import org.apache.commons.beanutils.PropertyUtils;
|
|
|
|
import org.junit.jupiter.api.Assertions;
|
|
|
|
import org.junit.jupiter.api.Assertions;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
|
|
|
|
|
|
import cokr.xit.base.crypto.bean.ARIA;
|
|
|
|
|
|
|
|
import cokr.xit.base.crypto.bean.DGuard;
|
|
|
|
import cokr.xit.base.crypto.bean.DGuard;
|
|
|
|
import cokr.xit.base.crypto.bean.Echelon;
|
|
|
|
import cokr.xit.base.crypto.bean.Echelon;
|
|
|
|
import cokr.xit.base.crypto.bean.XitAria;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class CryptographyTest /* extends TestSupport */ {
|
|
|
|
public class CryptographyTest /* extends TestSupport */ {
|
|
|
|
private String
|
|
|
|
private String
|
|
|
@ -37,7 +35,7 @@ public class CryptographyTest /* extends TestSupport */ {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
void aria() {
|
|
|
|
void aria() {
|
|
|
|
String name = "aria";
|
|
|
|
String name = "aria";
|
|
|
|
Cryptography aria = new ARIA(name);
|
|
|
|
Cryptography aria = Cryptography.get(name);
|
|
|
|
Assertions.assertEquals(name, aria.name());
|
|
|
|
Assertions.assertEquals(name, aria.name());
|
|
|
|
|
|
|
|
|
|
|
|
String encrypted = aria.encrypt(text),
|
|
|
|
String encrypted = aria.encrypt(text),
|
|
|
@ -54,7 +52,7 @@ public class CryptographyTest /* extends TestSupport */ {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
void xitAria() {
|
|
|
|
void xitAria() {
|
|
|
|
String name = "xit-aria";
|
|
|
|
String name = "xit-aria";
|
|
|
|
Cryptography aria = new XitAria(name);
|
|
|
|
Cryptography aria = Cryptography.get(name);
|
|
|
|
|
|
|
|
|
|
|
|
String str = "7011102177320",
|
|
|
|
String str = "7011102177320",
|
|
|
|
encrypted = aria.encrypt(str),
|
|
|
|
encrypted = aria.encrypt(str),
|
|
|
|