This commit enhances the Trix container with two new features for improved data integrity and flexibility:
1. **Configurable Checksums:**
- The `Trix` struct now has a `ChecksumAlgo` field to specify a hash algorithm.
- If set, `Encode` computes a checksum of the payload and adds it to the header.
- `Decode` verifies this checksum, returning an error if it doesn't match, ensuring data integrity during transit.
2. **Asymmetrical Sigils:**
- The `Sigils` field has been replaced with `InSigils` and `OutSigils` to support different transformation chains for packing and unpacking.
- If `OutSigils` is not set, `Unpack` defaults to using the `InSigils` chain to maintain the previous symmetrical behavior.
These features make the `Trix` container a more robust and self-verifying format for internal data transfer.
This commit introduces a new, generic `.trix` file format, which is decoupled from any specific encryption algorithm.
The format is defined in `docs/trix_format.md` and consists of a magic number, version, a flexible JSON header, and a raw data payload.
A new `trix` Go package is implemented to handle the encoding and decoding of this format. Unit tests are included to verify the implementation.
An example file, `examples/main.go`, is also added to demonstrate how to use the `.trix` container to store data encrypted with the `chachapoly` package, showcasing the intended decoupled design.