4internal static class NdsSecureAreaValidator
10 public static void Validate(
12 List<NdsDiagnostic> diagnostics,
13 NdsKey1KeyTable? keyTable)
15 NdsSecureAreaInspection inspection;
18 inspection = NdsSecureArea.Inspect(image, keyTable);
20 catch (ArgumentException exception)
25 $
"The product code cannot initialize KEY1 validation: {exception.Message}",
35 "The header places ARM9 in the secure-area interval, but the physical image does not contain all 16 KiB.",
43 "The supplied KEY1 table and product code do not recover a recognized secure-area identifier.",
47 if (inspection.IsCrcValid ==
false)
52 $
"The secure-area CRC stores 0x{inspection.StoredCrc:X4}, but the encrypted representation calculates 0x{inspection.CalculatedCrc:X4}.",
NdsSecureAreaState
Classifies the cartridge security interval without conflating encrypted bytes with malformed metadata...
NdsDiagnosticSeverity
Indicates the impact of a validation finding.