ImSQL
C++ 기반 SQL 자동화 및 라이선스 관리 엔진
Loading...
Searching...
No Matches
license_key_decrypt.hpp File Reference

라이선스 키 복호화 및 서명 검증 관련 유틸리티를 정의한 파일입니다. More...

#include <utils/utils.hpp>
+ Include dependency graph for license_key_decrypt.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool license::readFile (const std::string &filepath, std::string &out)
 지정된 파일 경로로부터 텍스트 데이터를 읽어온다.
 
std::string license::decryptAES256 (const std::string &cipher, const std::string &uuid_key)
 AES-256-CBC 알고리즘을 사용하여 Base64 인코딩된 암호문을 복호화한다.
 
bool license::loadLicenseFile (const std::string &filepath, std::string &license_json)
 라이센스 파일 로드
 
bool license::decryptLicenseData (const std::string &decrypted_data, std::string &plain_text)
 LicenseData 복호화
 
std::string license::getDecryptKey ()
 DecryptKey.
 
bool license::loadPemFile (const std::string &pem_code, const std::string &license_json_str)
 PEM 파일을 로드하고 ECDSA 서명을 검증한다.
 

Detailed Description

라이선스 키 복호화 및 서명 검증 관련 유틸리티를 정의한 파일입니다.

Function Documentation

◆ decryptAES256()

std::string license::decryptAES256 ( const std::string & cipher,
const std::string & uuid_key )

AES-256-CBC 알고리즘을 사용하여 Base64 인코딩된 암호문을 복호화한다.

Parameters
cipherBase64로 인코딩된 암호문 문자열
uuid_key복호화에 사용할 UUID 기반 키 문자열
Returns
복호화된 평문 문자열. 실패 시 빈 문자열 반환

◆ decryptLicenseData()

bool license::decryptLicenseData ( const std::string & decrypted_data,
std::string & plain_text )

LicenseData 복호화

Parameters
decrypted_data암호화된 라이센스 데이터 (LicenseFile 원문)
plain_text원본 라이센스 데이터
Returns
true 라이센스 정보 복호화 성공
false 라이센스 정보 복호화 실패

◆ getDecryptKey()

std::string license::getDecryptKey ( )

DecryptKey.

Returns
std::string

◆ loadLicenseFile()

bool license::loadLicenseFile ( const std::string & filepath,
std::string & license_json )

라이센스 파일 로드

Parameters
filepath
license_json라이센스 Json 데이터
Returns
true
false

◆ loadPemFile()

bool license::loadPemFile ( const std::string & pem_code,
const std::string & license_json_str )

PEM 파일을 로드하고 ECDSA 서명을 검증한다.

Parameters
pem_codePEM 형식 공개키 static
license_json_str서명이 포함된 라이센스 JSON 문자열
Returns
true 서명 검증 성공 (라이센스 유효)
false 서명 검증 실패 (라이센스 무효)

◆ readFile()

bool license::readFile ( const std::string & filepath,
std::string & out )

지정된 파일 경로로부터 텍스트 데이터를 읽어온다.

Parameters
filepath읽어올 파일 경로
out파일에서 읽은 내용을 저장할 문자열 참조
Returns
true 파일 읽기 성공
false 파일 열기 또는 읽기 실패