Tink를 설치하고 설정한 후 다음 단계를 진행합니다.
호환성
모든 라이브러리와 호환됨 | Tink C++와도 호환됨 | |
---|---|---|
언어 | C++ >= 17 | 해당 사항 없음 |
OS | UbuntuLTS >= 20.04 (x86_64) macOS >= 12.5 Monterey (x86_64) |
Windows Server 2019 이상 (x86_64) |
컴파일러 | GCC >= 7.5.0 Apple Clang >= 14 |
MSVC >= 2019 |
빌드 시스템 | Bazel >= 7 LTS | CMake >= 3.13 |
설치
Tink C++
핵심 C++ 라이브러리는 tink-cc이며 최신 버전은 2.4.0입니다.
Bazel
Bzlmod
MODULE.bazel
파일에 다음을 추가합니다.
bazel_dep(name = "tink_cc", version = "2.4.0")
워크스페이스
WORKSPACE
파일에 다음을 추가합니다.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "tink_cc",
urls = ["https://github.com/tink-crypto/tink-cc/archive/refs/tags/v2.4.0.zip"],
strip_prefix = "tink-2.4.0",
sha256 = "06c4d49b0b1357f0b8c3abc77a7d920130dc868e4597d432a9ce1cda4f65e382",
)
load("@tink_cc//:tink_cc_deps.bzl", "tink_cc_deps")
tink_cc_deps()
load("@tink_cc//:tink_cc_deps_init.bzl", "tink_cc_deps_init")
tink_cc_deps_init()
CMake
tink-cc
를 트리 내 종속 항목으로 추가합니다.
cmake_minimum_required(VERSION 3.13)
project(YourProject CXX)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 14)
include(FetchContent)
# Import Tink as an in-tree dependency.
FetchContent_Declare(
tink
URL https://github.com/tink-crypto/tink-cc/archive/refs/tags/v2.4.0.zip
URL_HASH SHA256=06c4d49b0b1357f0b8c3abc77a7d920130dc868e4597d432a9ce1cda4f65e382
)
FetchContent_GetProperties(tink)
if(NOT googletest_POPULATED)
FetchContent_Populate(tink)
add_subdirectory(${tink_SOURCE_DIR} ${tink_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
add_executable(your_app your_app.cc)
target_link_libraries(your_app tink::static)
AWS KMS 확장 프로그램
Tink C++ AWS KMS 확장 프로그램은 2.0.1이 최신 버전인 tink-cc-awskms입니다.
Bazel
워크스페이스
WORKSPACE
파일에 다음을 추가합니다.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "tink_cc",
urls = ["https://github.com/tink-crypto/tink-cc/archive/refs/tags/v2.4.0.zip"],
strip_prefix = "tink-2.4.0",
sha256 = "06c4d49b0b1357f0b8c3abc77a7d920130dc868e4597d432a9ce1cda4f65e382",
)
load("@tink_cc//:tink_cc_deps.bzl", "tink_cc_deps")
tink_cc_deps()
load("@tink_cc//:tink_cc_deps_init.bzl", "tink_cc_deps_init")
tink_cc_deps_init()
http_archive(
name = "tink_cc_awskms",
urls = ["https://github.com/tink-crypto/tink-cc-awskms/archive/refs/tags/v2.0.1.zip"],
strip_prefix = "tink-cc-awskms-2.0.1",
sha256 = "366319b269f62af120ee312ce4c99ce3738ceb23ce3f9491b4859432f8b991a4",
)
load("@tink_cc_awskms//:tink_cc_awskms_deps.bzl", "tink_cc_awskms_deps")
tink_cc_awskms_deps()
Google Cloud KMS 확장 프로그램
Tink C++ Google Cloud KMS 확장 프로그램은 2.3.0이 최신 버전인 tink-cc-gcpkms입니다.
Bazel
워크스페이스
WORKSPACE
파일에 다음을 추가합니다.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "tink_cc_gcpkms",
urls = ["https://github.com/tink-crypto/tink-cc-gcpkms/releases/download/v2.3.0/tink-cc-gcpkms-2.3.0.zip"],
strip_prefix = "tink-cc-gcpkms-2.3.0",
sha256 = "5af0d0a502afc346bbaa40f226e8f3b28fe3f5def696cbaaa7bc13702af78901",
)
load("@tink_cc_gcpkms//:tink_cc_gcpkms_deps.bzl", "tink_cc_gcpkms_deps")
tink_cc_gcpkms_deps()
load("@tink_cc_gcpkms//:tink_cc_gcpkms_deps_init.bzl", "tink_cc_gcpkms_deps_init")
tink_cc_gcpkms_deps_init(register_go = True)
다음 단계
Tink 설정을 완료한 후 표준 Tink 사용 단계를 계속 진행합니다.