1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-06-15 00:56:07 -05:00

Refactor: Use symbolic constants for volume header magic numbers (#1525)

Replaced hardcoded 0x56455241 ('VERA') with TC_HEADER_MAGIC for better readability and maintainability.
Also replaced 0x5645524142455854 with TC_BOOT_DRIVE_FILTER_EXTENSION_MAGIC and added 'ULL' suffix for 64-bit safety.
This commit is contained in:
Bernard Ladenthin
2025-04-21 11:24:02 +02:00
committed by GitHub
parent 1f4f6d09d8
commit 5eb358ca18
6 changed files with 14 additions and 10 deletions
+6
View File
@@ -21,6 +21,12 @@ extern "C" {
// Volume header version
#define VOLUME_HEADER_VERSION 0x0005
// Volume header magic identifiers
// 32-bit magic number identifying a valid VeraCrypt volume header ("VERA" in ASCII)
#define TC_HEADER_MAGIC_NUMBER 0x56455241
// 64-bit magic number identifier for boot drive filter extension ("VERABEXT" in ASCII)
#define TC_BOOT_DRIVE_FILTER_EXTENSION_MAGIC_NUMBER 0x5645524142455854ULL
// Version number written to volume header during format;
// specifies the minimum program version required to mount the volume
#define TC_VOLUME_MIN_REQUIRED_PROGRAM_VERSION 0x010b