mirror of
https://github.com/SabreTools/NDecrypt.git
synced 2026-09-23 15:24:50 +00:00
It's very strange but there are some files that don't decrypt/re-encrypt properly at this point. It could be a key issue, but it's unknown for now.
32 lines
690 B
C#
32 lines
690 B
C#
using System.IO;
|
|
|
|
namespace ThreeDS.Headers
|
|
{
|
|
public class PartitionTableEntry
|
|
{
|
|
public uint Offset { get; set; }
|
|
public uint Length { get; set; }
|
|
|
|
public static PartitionTableEntry Read(BinaryReader reader)
|
|
{
|
|
PartitionTableEntry entry = new PartitionTableEntry();
|
|
|
|
try
|
|
{
|
|
entry.Offset = reader.ReadUInt32();
|
|
entry.Length = reader.ReadUInt32();
|
|
return entry;
|
|
}
|
|
catch
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public bool IsValid()
|
|
{
|
|
return Offset != 0 && Length != 0;
|
|
}
|
|
}
|
|
}
|