Files
beerpsi_fsdecrypt/fixtures
JujuforceandClaude Opus 4.8 d79ded6ee5 test: add synthetic, committable e2e fixtures (base/delta app + opt)
Forge three small fixtures with no proprietary content so the e2e test runs by
default and covers the full decrypt+extract path, including the delta/base VHD merge:

- TEST_T001_..._0.opt              encrypted exFAT (OPTION key)
- TEST_1.00.00_..._0.app           base APP: outer NTFS -> internal_0.vhd (fixed) -> inner NTFS
- TEST_1.01.00_..._1_1.00.00.app   delta APP: differencing internal_1.vhd, auto-merged with base by GUID

The APP fixtures use the synthetic game id TEST, decrypted via the committed
TEST.bin external key (also exercising that key-file fallback). e2e.rs copies the
fixtures + key into a temp dir and runs from there so the delta finds its base and
the key. .gitignore whitelists only these synthetic files so real containers
dropped in fixtures/ stay private. The generator is kept local, not committed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 13:37:37 +02:00
..

Test fixtures

These are synthetic SEGA fscrypt containers used by tests/e2e.rs. They contain only dummy files (a few text/XML/stub binaries), so they are safe to commit — there is no proprietary game content inside.

File Type What it exercises
TEST_T001_20240101120000_0.opt OPTION exFAT decrypt + extract (built-in OPTION key)
TEST_1.00.00_20240101120000_0.app APP (base) outer NTFS → internal_0.vhd (fixed VHD) → inner NTFS extract
TEST_1.01.00_20240102120000_1_1.00.00.app APP (delta) differencing internal_1.vhd, auto-merged against the base by VHD GUID
TEST.bin key external key (16-byte key + 16-byte IV) for game id TEST

The delta is a real differencing VHD linked to the base; decrypting it (with the base alongside) merges the two and yields the base files plus the delta's added data/patch_notes.txt and a modified readme.txt.

The .app fixtures use the synthetic game id TEST, which is not in the built-in key table — so they are decrypted via the external-key-file fallback using the committed TEST.bin (this also exercises that fallback path). tests/e2e.rs copies TEST.bin next to the containers and runs from there so the binary finds it. The OPTION fixture uses the built-in OPTION key. Everything here — keys and filesystem data alike — is synthetic.

You can also drop your own real .app/.opt files in this folder to test against them; everything here except these committed fixtures is git-ignored.

Regenerating

These are generated by a local, uncommitted script set (NTFS/exFAT image creation in Docker + a small SEGA fscrypt packer adapted from beerpsi/x). The byte output is not reproducible (NTFS/exFAT embed creation timestamps), but regenerated fixtures are functionally equivalent.