Files
SabreTools.Serialization/SabreTools.Data.Models/STFS/HashTableEntry.cs
Deterous 7485a43364 Secure Transacted File System (STFS) Support (#78)
* Initial STFS support

* Fix build errors

* Fix more build errors

* Final fix

* Cleanup printer

* Fix indent
2026-04-07 22:14:39 -04:00

34 lines
992 B
C#

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();
}
}