mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-22 14:55:11 +00:00
Secure Transacted File System (STFS) Support (#78)
* Initial STFS support * Fix build errors * Fix more build errors * Final fix * Cleanup printer * Fix indent
This commit is contained in:
33
SabreTools.Data.Models/STFS/HashTableEntry.cs
Normal file
33
SabreTools.Data.Models/STFS/HashTableEntry.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
using SabreTools.Numerics;
|
||||
|
||||
namespace SabreTools.Data.Models.STFS
|
||||
{
|
||||
/// <summary>
|
||||
/// STFS Hash Table Entry in a Hash Block's Hash Table
|
||||
/// </summary>
|
||||
/// <see href="https://free60.org/System-Software/Formats/STFS/"/>
|
||||
public class HashTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// SHA-1 hash of the block
|
||||
/// </summary>
|
||||
public byte[] Hash { get; set; } = new byte[20];
|
||||
|
||||
/// <summary>
|
||||
/// Status of the block
|
||||
/// 0x00 = Unused block
|
||||
/// 0x40 = Free block (previously used, now freed)
|
||||
/// 0x80 = Used block
|
||||
/// 0xC0 = Newly allocated block
|
||||
/// </summary>
|
||||
public byte Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Block number corresponding to the hash
|
||||
/// FFFFFF = Block 1 (starting 0xB000)
|
||||
/// </summary>
|
||||
/// <remarks>Big-endian, 3-byte uint24</remarks>
|
||||
public UInt24 BlockNumber { get; set; } = new();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user