Files

66 lines
2.1 KiB
C#
Raw Permalink Normal View History

2025-09-26 13:06:18 -04:00
namespace SabreTools.Data.Models.SecuROM
2025-09-26 12:09:34 -04:00
{
public class MatroshkaEntry
{
/// <summary>
/// File entry path, either 256 or 512 bytes
/// </summary>
/// <remarks>
/// Versions without a key prefix are 256 bytes.
/// Versions with key values either are 256 or 512 bytes.
/// Stored as a string as the rest of the 256/512 bytes are just padding.
/// </remarks>
public string Path { get; set; } = string.Empty;
2025-09-26 12:09:34 -04:00
/// <summary>
/// Type of the entry data
/// </summary>
public MatroshkaEntryType EntryType { get; set; }
/// <summary>
/// Data size
/// </summary>
public uint Size { get; set; }
/// <summary>
/// Data offset within the package
/// </summary>
public uint Offset { get; set; }
/// <summary>
/// Unknown value only seen in later versions
/// </summary>
/// <remarks>Does not indicate that the offset is or isn't a 64-bit value</remarks>
public uint? Unknown { get; set; }
/// <summary>
/// File modification time, stored in NTFS filetime.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times"/>
2025-09-26 12:09:34 -04:00
public ulong ModifiedTime { get; set; }
/// <summary>
/// File creation time, stored in NTFS filetime.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times"/>
2025-09-26 12:09:34 -04:00
public ulong CreatedTime { get; set; }
/// <summary>
/// File access time, stored in NTFS filetime.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times"/>
2025-09-26 12:09:34 -04:00
public ulong AccessedTime { get; set; }
/// <summary>
/// MD5 hash of the data
/// </summary>
/// <remarks>16 bytes</remarks>
public byte[] MD5 { get; set; } = new byte[16];
2025-09-26 12:09:34 -04:00
/// <summary>
/// The file data, stored as a byte array
/// </summary>
public byte[] FileData { get; set; } = [];
2025-09-26 12:09:34 -04:00
}
}