namespace SabreTools.Data.Models.N3DS { /// /// A format used to store information about a title (installed title, DLC, etc.) /// and all its installed contents, including which contents they consist of and /// their SHA256 hashes. /// /// public sealed class TitleMetadata { /// /// Signature Type /// public SignatureType SignatureType { get; set; } /// /// Signature size /// public ushort SignatureSize { get; set; } /// /// Padding size /// public byte PaddingSize { get; set; } /// /// Signature /// public byte[] Signature { get; set; } = []; /// /// Padding /// public byte[] Padding1 { get; set; } = []; /// /// Signature Issuer /// public string Issuer { get; set; } = string.Empty; /// /// Version /// public byte Version { get; set; } /// /// CaCrlVersion /// public byte CaCrlVersion { get; set; } /// /// SignerCrlVersion /// public byte SignerCrlVersion { get; set; } /// /// Reserved /// public byte Reserved1 { get; set; } /// /// System Version /// public ulong SystemVersion { get; set; } /// /// TitleID /// public ulong TitleID { get; set; } /// /// Title Type /// public uint TitleType { get; set; } /// /// Group ID /// public ushort GroupID { get; set; } /// /// Save Data Size in Little Endian (Bytes) (Also SRL Public Save Data Size) /// public uint SaveDataSize { get; set; } /// /// SRL Private Save Data Size in Little Endian (Bytes) /// public uint SRLPrivateSaveDataSize { get; set; } /// /// Reserved /// /// 4 bytes public byte[] Reserved2 { get; set; } = new byte[4]; /// /// SRL Flag /// public byte SRLFlag { get; set; } /// /// Reserved /// /// 0x31 bytes public byte[] Reserved3 { get; set; } = new byte[0x31]; /// /// Access Rights /// public uint AccessRights { get; set; } /// /// Title Version /// public ushort TitleVersion { get; set; } /// /// Content Count (big-endian) /// public ushort ContentCount { get; set; } /// /// Boot Content /// public ushort BootContent { get; set; } /// /// Padding /// /// 2 bytes public byte[] Padding2 { get; set; } = new byte[2]; /// /// SHA-256 Hash of the Content Info Records /// /// 0x20 bytes public byte[] SHA256HashContentInfoRecords { get; set; } = new byte[0x20]; /// /// There are 64 of these records, usually only the first is used. /// public ContentInfoRecord[] ContentInfoRecords { get; set; } = []; /// /// There is one of these for each content contained in this title. /// (Determined by "Content Count" in the TMD Header). /// public ContentChunkRecord[] ContentChunkRecords { get; set; } = []; /// /// Certificate chain /// /// /// https://www.3dbrew.org/wiki/Title_metadata#Certificate_Chain /// public Certificate[] CertificateChain { get; set; } = []; } }