10 private byte[]? _dsiHmacKey;
29 throw new ArgumentException(
"A DSi validation HMAC key cannot be empty.", nameof(key));
32 _dsiHmacKey = key.ToArray();
44 _secureAreaKeyTable = keyTable ??
throw new ArgumentNullException(nameof(keyTable));
56 _dsiRsaPublicKey = publicKey ??
throw new ArgumentNullException(nameof(publicKey));
76 internal ReadOnlyMemory<byte> DsiHmacKey => _dsiHmacKey;
85 internal void Validate()
89 throw new ArgumentException(
"DSi digest validation limits must allow at least one 20-byte entry and one finding.");
Represents one explicitly trusted RSA-1024 public key for DSi header authentication....
Holds the 18 round words and four 256-word substitution boxes consumed by the DS KEY1 algorithm....
Supplies optional trust material and policy for validation checks that cannot be inferred from image ...
static NdsValidationOptions Default
Returns a fresh keyless policy suitable for structural validation without shared mutable state.
NdsValidationOptions SetDsiHmacKey(ReadOnlySpan< byte > key)
Recomputes DSi component HMAC-SHA1 fields with caller-supplied trust material. Merely storing a match...
int MaxDsiDigestFailures
Caps individual sector/block mismatch diagnostics while retaining a final truncation warning.
bool ValidateDsiDevelopmentSignature
Verifies a recognizable no$gba development marker against the finalized 0xE00-byte header input....
NdsValidationOptions SetSecureAreaKeyTable(NdsKey1KeyTable keyTable)
Enables secure-area identifier recovery and encrypted-form CRC validation. No default table is bundle...
NdsValidationOptions SetDsiRsaPublicKey(NdsDsiRsaPublicKey publicKey)
Enables DSi header authenticity verification against one explicitly trusted RSA-1024 key....
int MaxDsiDigestTableBytes
Bounds each materialized DSi digest table while sector contents themselves remain streamed....