如何在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/

相关推荐
阿白的白日梦2 天前
winget基础管理---更新/修改源为国内源
windows
埃博拉酱6 天前
VS Code Remote SSH 连接 Windows 服务器卡在"下载 VS Code 服务器":prcdn DNS 解析失败的诊断与 BITS 断点续传
windows·ssh·visual studio code
唐宋元明清21886 天前
.NET 本地Db数据库-技术方案选型
windows·c#
加号36 天前
windows系统下mysql多源数据库同步部署
数据库·windows·mysql
tryCbest6 天前
Windows环境下配置pip镜像源
windows·pip
呉師傅6 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
百事牛科技6 天前
保护文档安全:PDF限制功能详解与实操
windows·pdf
一个人旅程~7 天前
如何用命令行把win10/win11设置为长期暂停更新?
linux·windows·经验分享·电脑
一个假的前端男7 天前
[特殊字符] Flutter 安装完整指南 Windows—— 2026最新版
windows·flutter
倚肆7 天前
在 Windows Docker 中安装并配置 Nginx (映射 Windows 端口与路径)
windows·nginx·docker