nice on 암호화 수정
This commit is contained in:
+4
@@ -84,6 +84,7 @@ import com.nimbusds.jwt.SignedJWT;
|
|||||||
import com.kjbank.encrypt.exchange.crypto.AES256GCMCipher;
|
import com.kjbank.encrypt.exchange.crypto.AES256GCMCipher;
|
||||||
import com.kjbank.encrypt.exchange.crypto.ECDHESA256Cipher;
|
import com.kjbank.encrypt.exchange.crypto.ECDHESA256Cipher;
|
||||||
import com.eactive.eai.authserver.service.OAuth2Manager;
|
import com.eactive.eai.authserver.service.OAuth2Manager;
|
||||||
|
import com.kjbank.simple.core.exchange.crypto.ExchangeCrypto;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -327,6 +328,7 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
auth = niceToken + ":" + currentTime + ":" + clientId ;
|
auth = niceToken + ":" + currentTime + ":" + clientId ;
|
||||||
logger.debug("HttpClientAdapterServiceRest] NiceOn auth = [" + auth + "]");
|
logger.debug("HttpClientAdapterServiceRest] NiceOn auth = [" + auth + "]");
|
||||||
auth = Base64.getEncoder().encodeToString(auth.getBytes("UTF-8"));
|
auth = Base64.getEncoder().encodeToString(auth.getBytes("UTF-8"));
|
||||||
|
logger.debug("HttpClientAdapterServiceRest] NiceOn Base64 encoded auth = [" + auth + "]");
|
||||||
|
|
||||||
setNiceOnAuthHeaders(method, auth);
|
setNiceOnAuthHeaders(method, auth);
|
||||||
} else {
|
} else {
|
||||||
@@ -1072,7 +1074,9 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
case "AES256-NICEON":
|
case "AES256-NICEON":
|
||||||
try {
|
try {
|
||||||
String key = clientSecretKey.substring(10,42);
|
String key = clientSecretKey.substring(10,42);
|
||||||
|
logger.debug("HttpClientAdapterServiceRest] NICE ON AES256 Encryption key is :+="+key);
|
||||||
encryptedMessage = AES256Cipher.encrypt(eaiBody.toString(), key);
|
encryptedMessage = AES256Cipher.encrypt(eaiBody.toString(), key);
|
||||||
|
//encryptedMessage = ExchangeCrypto.encodedData(eaiStringBody, clientSecretKey);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("HttpClientAdapterServiceRest] AES256 Encryption error=" + e.getMessage());
|
logger.error("HttpClientAdapterServiceRest] AES256 Encryption error=" + e.getMessage());
|
||||||
|
|||||||
Reference in New Issue
Block a user