NdsForge.NET
1.0.1
Read, validate, edit, compare, and build Nintendo DS and DSi images from .NET
Loading...
Searching...
No Matches
NdsDsiDigestOptions.cs
1
namespace
NdsForge
;
2
7
public
sealed
record
NdsDsiDigestOptions
8
{
10
public
static
NdsDsiDigestOptions
Default
{
get
; } =
new
();
11
16
public
int
SectorSize
{
get
; init; } = 0x400;
17
22
public
int
BlockSectorCount
{
get
; init; } = 0x20;
23
26
internal
void
Validate()
27
{
28
if
(SectorSize < 0x200 || SectorSize > 16 * 1024 * 1024 || (SectorSize & (SectorSize - 1)) != 0)
29
{
30
throw
new
ArgumentException(
"DSi digest sectors must be a power of two from 512 bytes through 16 MiB."
);
31
}
32
33
if
(BlockSectorCount is < 1 or > 65_536)
34
{
35
throw
new
ArgumentException(
"A DSi digest block must contain from one through 65,536 sector hashes."
);
36
}
37
}
38
}
NdsForge.NdsDsiDigestOptions
Configures the optional DSi hierarchical HMAC-SHA1 tables that cover common NTR content and DSi-mode ...
Definition
NdsDsiDigestOptions.cs:8
NdsForge.NdsDsiDigestOptions.SectorSize
int SectorSize
Splits each covered content range into independently authenticated chunks. The value must be a power ...
Definition
NdsDsiDigestOptions.cs:16
NdsForge.NdsDsiDigestOptions.BlockSectorCount
int BlockSectorCount
Groups this many consecutive 20-byte sector HMACs into one block-table HMAC. Values from one through ...
Definition
NdsDsiDigestOptions.cs:22
NdsForge.NdsDsiDigestOptions.Default
static NdsDsiDigestOptions Default
Uses the conventional 1 KiB content sector and 32 sector hashes per second-level block.
Definition
NdsDsiDigestOptions.cs:10
NdsForge
Definition
NdsBanner.cs:5
src
NdsForge
Building
NdsDsiDigestOptions.cs
Generated by
1.17.0