Registry for encrypt keys and DLC asset paths. This tracks which encrypt key is
associated with which DLC id, and which asset paths are associated with which DLC id
so that they can be reloaded when the DLC is unlocked.
Defines a simple “text-like” asset type along with a loader and a Bevy
plugin for it. The generated loader reads the file as UTF-8 and stores a
String in the asset. The plugin registers the loader and the DLC type.
Builds a Vec<PackItem> from a list of entries. Each entry specifies a
path and its raw contents; optional query-style suffixes allow specifying an
explicit original extension or a type path as well.
Represents a single encrypted file inside a .dlcpack container, along with its metadata (DLC ID, original extension, optional type path). The ciphertext is not decrypted at this stage; decryption is performed on demand by DlcPackEntry::decrypt_bytes using the global encrypt key registry.
Compression level for packing. Controls the trade-off between pack size and packing time.
Higher levels produce smaller files but take longer to create.
Parse a .dlcpack container and return product, embedded dlc_id, and a list
of (path, EncryptedAsset) pairs. For v3 format, also validates the signature
against the authorized product public key.
Extract the embedded encryption key from a signed license’s payload (base64url-encoded).
Returns None if the token is malformed or contains no encrypt_key.
Simple heuristic used by the packer to detect executable payloads. It is
intentionally forgiving; the goal is merely to catch obvious binaries when
a user accidentally tries to pack them.
Pack multiple entries into a single encrypted .dlcpack binary using the latest version format. This is the main entry point for pack creation and is used by the CLI tool; it can also be used by other tools that want to generate packs programmatically.
Parse the binary encrypted-asset format from a byte slice. This is used by the pack loader when parsing the pack metadata, and also by the DlcLoader when decrypting individual entries (since the entry metadata is stored in the same format as a standalone encrypted file).
Register an encryption key for a DLC ID in the global registry.
This is used internally by the plugin and can be called by tools/CLI for key management.