From 596c443112d09506c3bf13ac98046a84b912e56c Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 9 Jun 2025 13:23:49 +0100 Subject: Use Windows library for cryptographic checksums Add a new feature to libbb, FEATURE_USE_CNG_API, which enables the use of the Cryptography API: Next Generation library to calculate checksums. It is disabled by default except in the mingw64u default config, as the API requires Windows 10+ to function. Usage of this API provides a size benefit and delegates hardware optimizations to the operating system cryptography library. Based on GitHub PR #498 by rfl890. Saves 4064 bytes in the mingw64u case. --- scripts/mk_mingw64u_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/mk_mingw64u_defconfig b/scripts/mk_mingw64u_defconfig index 19124d735..5561a0900 100755 --- a/scripts/mk_mingw64u_defconfig +++ b/scripts/mk_mingw64u_defconfig @@ -32,6 +32,7 @@ set_build_opts \ CONFIG_LAST_SUPPORTED_WCHAR=1114111 \ CONFIG_UNICODE_COMBINING_WCHARS=y \ CONFIG_UNICODE_WIDE_WCHARS=y \ + CONFIG_FEATURE_USE_CNG_API=y \ < "$configs"/mingw64_defconfig \ > "$configs"/mingw64u_defconfig -- cgit v1.2.3-55-g6feb