mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-23 14:49:42 +00:00
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace SabreTools.Data.Models.N3DS
|
|
{
|
|
/// <summary>
|
|
/// The exheader has two sections:
|
|
/// - The actual exheader data, containing System Control Info (SCI) and Access Control Info (ACI);
|
|
/// - A signed copy of NCCH HDR public key, and exheader ACI. This version of the ACI is used as limitation to the actual ACI.
|
|
/// </summary>
|
|
/// <see href="https://www.3dbrew.org/wiki/NCCH/Extended_Header"/>
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public sealed class NCCHExtendedHeader
|
|
{
|
|
/// <summary>
|
|
/// SCI
|
|
/// </summary>
|
|
public SystemControlInfo SCI = new();
|
|
|
|
/// <summary>
|
|
/// ACI
|
|
/// </summary>
|
|
public AccessControlInfo ACI = new();
|
|
|
|
/// <summary>
|
|
/// AccessDesc signature (RSA-2048-SHA256)
|
|
/// </summary>
|
|
/// <remarks>0x100 bytes</remarks>
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x100)]
|
|
public byte[] AccessDescSignature = new byte[0x100];
|
|
|
|
/// <summary>
|
|
/// NCCH HDR RSA-2048 public key
|
|
/// </summary>
|
|
/// <remarks>0x100 bytes</remarks>
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x100)]
|
|
public byte[] NCCHHDRPublicKey = new byte[0x100];
|
|
|
|
/// <summary>
|
|
/// ACI (for limitation of first ACI)
|
|
/// </summary>
|
|
public AccessControlInfo ACIForLimitations = new();
|
|
}
|
|
}
|