ReadonlymediaDecrypts a fetched blob for a parsed attachment, verifying its ciphertext
and plaintext hashes, and caches the plaintext keyed by ciphertextSha256.
Encrypts a blob for sharing in a group message. The returned attachment has
its hashes, nonce, media type, and filename set but no locators — the
caller uploads encrypted to a blob store, adds a MediaAttachment
locator, then serializes it with encodeMediaImetaTag.
Optional group-scoped encrypted-media helper and plaintext cache adapter.
Note: key derivation here uses the group's CURRENT
ClientState. On send that is correct (the source epoch is the current epoch). On receive of media from an older epoch, the caller must supply the source-epoch state instead; source-epoch media-secret retention is tracked separately (seefeatures/encrypted-media.md— Key Derivation).