라이선스 키 복호화 및 서명 검증 관련 유틸리티를 정의한 파일입니다.
More...
Go to the source code of this file.
라이선스 키 복호화 및 서명 검증 관련 유틸리티를 정의한 파일입니다.
◆ decryptAES256()
std::string license::decryptAES256 |
( |
const std::string & | cipher, |
|
|
const std::string & | uuid_key ) |
AES-256-CBC 알고리즘을 사용하여 Base64 인코딩된 암호문을 복호화한다.
- Parameters
-
cipher | Base64로 인코딩된 암호문 문자열 |
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_code | PEM 형식 공개키 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 파일 열기 또는 읽기 실패