Merge branch 'jenkins_with_weblogic' of http://192.168.240.178:18080/eapim/elink-online-transformer.git into jenkins_with_weblogic
This commit is contained in:
Binary file not shown.
@@ -4,29 +4,25 @@ import java.util.Stack;
|
|||||||
|
|
||||||
import org.nfunk.jep.ParseException;
|
import org.nfunk.jep.ParseException;
|
||||||
import org.nfunk.jep.function.PostfixMathCommand;
|
import org.nfunk.jep.function.PostfixMathCommand;
|
||||||
|
|
||||||
import com.eactive.eai.common.property.PropManager;
|
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
// kj bank import 2025-09-23 jwhong
|
// kj bank import 2025-09-23 jwhong
|
||||||
//import org.kjbank.simple.core.crypto.seed.SeedUtil;
|
//import com.eactive.eai.common.seed.SeedKJ;
|
||||||
import com.eactive.eai.common.seed.SeedKJ;
|
//security-1.0.0.jar 사용으로 변경 2026-01-05
|
||||||
|
import com.eactive.eai.security.seed.Seed;
|
||||||
|
import com.eactive.eai.common.context.ElinkTransactionContext;
|
||||||
|
|
||||||
public class SeedKJDecrypt extends PostfixMathCommand {
|
public class SeedKJDecrypt extends PostfixMathCommand {
|
||||||
public SeedKJDecrypt() {
|
public SeedKJDecrypt() {
|
||||||
numberOfParameters = 2;
|
numberOfParameters = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(Stack inStack) throws ParseException {
|
public void run(Stack inStack) throws ParseException {
|
||||||
checkStack(inStack);
|
checkStack(inStack);
|
||||||
|
|
||||||
// USER FUNCTION에서 Parameter 에서 가져옴
|
String seedKey = ElinkTransactionContext.getSeedKey();
|
||||||
Object param2 = inStack.pop();
|
String decryptKey = StringUtils.leftPad(seedKey, 16, '0');
|
||||||
String param2Str = String.valueOf(param2); // null 안전 처리
|
|
||||||
String decryptKey = StringUtils.leftPad(param2Str, 16, '0');
|
|
||||||
|
|
||||||
Object param = inStack.pop();
|
Object param = inStack.pop();
|
||||||
|
|
||||||
@@ -52,8 +48,8 @@ public class SeedKJDecrypt extends PostfixMathCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String decryptedData = SeedKJ.decrypt(new String(value, StandardCharsets.UTF_8), decryptKey);
|
String decryptedData = Seed.decrypt(decryptKey, new String(value, StandardCharsets.UTF_8));
|
||||||
|
|
||||||
inStack.push(decryptedData);
|
inStack.push(decryptedData);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//throw new ExecutionException(e.getMessage(), parameters, e);
|
//throw new ExecutionException(e.getMessage(), parameters, e);
|
||||||
|
|||||||
@@ -5,29 +5,27 @@ import java.util.Stack;
|
|||||||
import org.nfunk.jep.ParseException;
|
import org.nfunk.jep.ParseException;
|
||||||
import org.nfunk.jep.function.PostfixMathCommand;
|
import org.nfunk.jep.function.PostfixMathCommand;
|
||||||
|
|
||||||
import com.eactive.eai.common.property.PropManager;
|
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
// kj bank import 2025-09-23 jwhong
|
// security-1.0.0.jar 사용으로 변경 2026-01-05
|
||||||
import com.eactive.eai.common.seed.SeedKJ;
|
import com.eactive.eai.security.seed.Seed;
|
||||||
import com.eactive.eai.common.seed.SeedCipher;
|
//kj bank import 2025-09-23 jwhong
|
||||||
|
//import com.eactive.eai.common.seed.SeedKJ;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
//import org.kjbank.simple.core.crypto.seed.SeedUtil;
|
import com.eactive.eai.common.context.ElinkTransactionContext;
|
||||||
|
|
||||||
public class SeedKJEncrypt extends PostfixMathCommand {
|
public class SeedKJEncrypt extends PostfixMathCommand {
|
||||||
public SeedKJEncrypt() {
|
public SeedKJEncrypt() {
|
||||||
numberOfParameters = 2;
|
numberOfParameters = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(Stack inStack) throws ParseException {
|
public void run(Stack inStack) throws ParseException {
|
||||||
checkStack(inStack);
|
checkStack(inStack);
|
||||||
|
|
||||||
// USER FUNCTION에서 Parameter 에서 가져옴
|
String seedKey = ElinkTransactionContext.getSeedKey();
|
||||||
Object param2 = inStack.pop();
|
String encryptKey = StringUtils.leftPad(seedKey, 16, '0');
|
||||||
String param2Str = String.valueOf(param2); // null 안전 처리
|
|
||||||
String encryptKey = StringUtils.leftPad(param2Str, 16, '0');
|
|
||||||
|
|
||||||
Object param = inStack.pop();
|
Object param = inStack.pop();
|
||||||
|
|
||||||
@@ -53,7 +51,7 @@ public class SeedKJEncrypt extends PostfixMathCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String encryptedData = SeedKJ.encrypt(new String(value, StandardCharsets.UTF_8), encryptKey);
|
String encryptedData = Seed.encrypt(encryptKey, new String(value, StandardCharsets.UTF_8));
|
||||||
|
|
||||||
inStack.push(encryptedData);
|
inStack.push(encryptedData);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user