KG이니시스 통합인증 암호화적용 여부 선택옵션 추가

This commit is contained in:
thisgun
2024-04-11 11:55:55 +09:00
parent 2aff3cd491
commit 470d65d92a
8 changed files with 32 additions and 9 deletions

View File

@ -67,10 +67,11 @@ function decrypt_SEED($str, $bszUser_key, $bszIV) {
$pdwRoundKey = array_pad(array(), 32, 0);
$bszPlainText = null;
$planBytresMessage = array();
// 방법 1
$bszPlainText = KISA_SEED_CBC::SEED_CBC_Decrypt($keyBytes, $IVBytes, $planBytes, 0, count($planBytes));
for ($i = 0; $i < sizeof($bszPlainText); $i++) {
for ($i = 0; $i < sizeof((array) $bszPlainText); $i++) {
$planBytresMessage[] = sprintf("%02X", $bszPlainText[$i]);
}
return Hex2String($planBytresMessage);

View File

@ -171,7 +171,7 @@ if (!defined('_KISA_SEED_KEY_')) {
var $key_data = null;
function KISA_SEED_KEY() {
function __construct() {
$this->key_data = array_pad(array(), 32, 0);
}
@ -192,7 +192,7 @@ if (!defined('_KISA_SEED_INFO_')) {
var $cbc_last_block = null;
var $last_block_flag = 0;
function KISA_SEED_INFO() {
function __construct() {
$this->ivec = array_pad(array(), 4, 0);
$this->seed_key = new KISA_SEED_KEY();
$this->cbc_buffer = array_pad(array(), 4, 0);