From 68f0201c11225997e9bbb7bc0092727ae0b8f238 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 30 Nov 2023 19:11:52 -0500 Subject: [PATCH] Add SafeDisc encrypted file entry model --- SafeDisc/Constants.cs | 13 +++++++++++++ SafeDisc/EncryptedFileEntry.cs | 31 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 SafeDisc/Constants.cs create mode 100644 SafeDisc/EncryptedFileEntry.cs diff --git a/SafeDisc/Constants.cs b/SafeDisc/Constants.cs new file mode 100644 index 0000000..76050d3 --- /dev/null +++ b/SafeDisc/Constants.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SabreTools.Models.SafeDisc +{ + public static class Constants + { + public const uint EncryptedFileEntrySignature1 = 0xA8726B03; + + public const uint EncryptedFileEntrySignature2 = 0xEF01996C; + } +} diff --git a/SafeDisc/EncryptedFileEntry.cs b/SafeDisc/EncryptedFileEntry.cs new file mode 100644 index 0000000..3a7fa29 --- /dev/null +++ b/SafeDisc/EncryptedFileEntry.cs @@ -0,0 +1,31 @@ +namespace SabreTools.Models.SafeDisc +{ + /// + public class EncryptedFileEntry + { + /// + /// 0xA8726B03 + /// + public uint Signature1 { get; set; } + + /// + /// 0xEF01996C + /// + public uint Signature2 { get; set; } + + public uint FileNumber { get; set; } + + public uint Offset1 { get; set; } + + public uint Offset2 { get; set; } + + public uint Unknown1 { get; set; } + + public uint Unknown2 { get; set; } + + /// + /// 0x0D bytes + /// + public byte[]? Name { get; set; } + } +}