如何在windows环境下编译T

一, 安装MYSYS2

  1. https://www.msys2.org下载 msys2-x86_64-xxxxx.exe;

  2. 按照msys2.org主页提示的步骤安装;

3.安装完默认起来的是 UCRT的, 可以根据环境的需要选择, 我选择的MSYS2 MINGW64

  1. 搭建编译环境, 安装对应的软件包

4.1 更新包数据和核心数据包

pacman -Syu

4.2 安装工具链

pacman -S mingw-w64-x86_64-gcc

4.3 安装其他软件和工具

pacman -S base-devel

pacman -S git

4.4 测试是否征程

gcc -v

4.5 安装cmake

pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-extra-cmake-modules

  1. 编译TR31 with the code in github

#Windows

rm -Rf build &&

cmake -B build -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DFETCH_MBEDTLS=YES -DFETCH_ARGP=YES &&

cmake --build build

  1. 验证结果

结果OK!

$ ./tr31-tool --import B0128B1TX00N0300KS18FFFF00A0200001E00000KC0C000169E3KP0C00ECAD626F9F1A826814AA066D86C8C18BD0E14033E1EBEC75BEDF586E6E325F3AA8C0E5 --kbpk AB2E09DB3EF0BA71E0CE6CD755C23A3B

Key block format version: B

Key block length: 128 bytes

Key usage: [B1] Initial DUKPT Key (IK/IPEK)

Key algorithm: [T] TDES

Key mode of use: [X] Key Derivation

Key version: Unused

Key exportability: [N] Not exportable

Optional blocks [3]:

KS\] Initial Key Serial Number (KSN): FFFF00A0200001E00000 \[KC\] Key Check Value (KCV) of wrapped key: 0169E3 (Legacy KCV algorithm) \[KP\] Key Check Value (KCV) of KBPK: ECAD62 (Legacy KCV algorithm) Key length: 16 Key value: BF82DAC6A33DF92CE66E15B70E5DCEB6 (KCV: 0169E3)

Get submodule with git command from some project with submoudles

git -clone --recursive <project URL >

三:Reference:

1.https://www.msys2.org/

相关推荐
AI袋鼠帝9 小时前
Claude4.5+Gemini3 接管电脑桌面,这回是真无敌了..
人工智能·windows·aigc
獨枭10 小时前
Windows 下安装与使用 Miniconda 完整指南
windows
命里有定数11 小时前
保姆级教程:在 Windows (WSL2) 下本地部署 Qwen3-ASR
windows
lucky670714 小时前
Windows 上彻底卸载 Node.js
windows·node.js
编程小白202615 小时前
从 C++ 基础到效率翻倍:Qt 开发环境搭建与Windows 神级快捷键指南
开发语言·c++·windows·qt·学习
凯子坚持 c16 小时前
CANN 性能剖析实战:从原始事件到交互式火焰图
windows·microsoft
开开心心就好17 小时前
发票合并打印工具,多页布局设置实时预览
linux·运维·服务器·windows·pdf·harmonyos·1024程序员节
獨枭17 小时前
PyCharm 跑通 SAM 全流程实战
windows
仙剑魔尊重楼18 小时前
音乐制作电子软件FL Studio2025.2.4.5242中文版新功能介绍
windows·音频·录屏·音乐·fl studio
PHP小志18 小时前
Windows 服务器怎么修改密码和用户名?账户被系统锁定如何解锁
windows