NHN_KCP 휴대폰 본인인증 설정 가맹점 인증키 추가

This commit is contained in:
thisgun
2024-10-31 12:17:26 +09:00
parent 830994b637
commit d96f47f93d
10 changed files with 65 additions and 7 deletions

View File

@ -20,7 +20,7 @@ class C_CT_CLI
}
// hash 처리 영역
function make_hash_data( $home_dir , $str )
function make_hash_data( $home_dir , $key , $str )
{
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit
@ -32,6 +32,7 @@ class C_CT_CLI
}
$hash_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__make_hash_data",
$key,
$str
);
@ -41,7 +42,7 @@ class C_CT_CLI
}
// dn_hash 체크 함수
function check_valid_hash ($home_dir , $hash_data , $str )
function check_valid_hash ($home_dir , $key , $hash_data , $str )
{
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit
@ -53,6 +54,7 @@ class C_CT_CLI
}
$ret_val = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__check_valid_hash" ,
$key,
$hash_data ,
$str
);
@ -63,7 +65,7 @@ class C_CT_CLI
}
// 암호화 인증데이터 복호화
function decrypt_enc_cert ( $home_dir, $site_cd , $cert_no , $enc_cert_data , $opt)
function decrypt_enc_cert ( $home_dir, $key , $site_cd , $cert_no , $enc_cert_data , $opt)
{
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit
@ -73,6 +75,7 @@ class C_CT_CLI
$dec_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__decrypt_enc_cert" ,
$key,
$site_cd ,
$cert_no ,
$enc_cert_data ,
@ -84,6 +87,7 @@ class C_CT_CLI
$dec_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__decrypt_enc_cert" ,
$key,
$site_cd ,
$cert_no ,
$enc_cert_data
@ -96,6 +100,26 @@ class C_CT_CLI
parse_str( str_replace( chr( 31 ), "&", $dec_data ), $this->m_dec_data );
}
function get_kcp_lib_ver( $home_dir )
{
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if(PHP_INT_MAX == 2147483647) // 32-bit
$bin_exe = $home_dir . '/bin/ct_cli';
else
$bin_exe = $home_dir . '/bin/ct_cli_x64';
} else {
$bin_exe = $home_dir . '/bin/ct_cli_exe.exe';
}
$ver_data = $this -> mf_exec( $bin_exe ,
"lf_CT_CLI__get_kcp_lib_ver"
);
if ( $ver_data == "" ) { $ver_data = "HS04"; }
return $ver_data;
}
// 인증데이터 get data
function mf_get_key_value( $name )
{