Decrypts a media file received in a Marmot group message (MIP-04 v2).
Verifies the ChaCha20-Poly1305 authentication tag and then confirms the
SHA-256 of the decrypted content matches the sha256 field from the
attachment, as required by MIP-04.
The sha256, type, filename, and nonce fields must all be present.
Parse these from the imeta tag using getFileMetadataFromImetaTag from
applesauce, then cast/extend to MediaAttachment.
Decrypts a media file received in a Marmot group message (MIP-04 v2).
Verifies the ChaCha20-Poly1305 authentication tag and then confirms the SHA-256 of the decrypted content matches the
sha256field from the attachment, as required by MIP-04.The
sha256,type,filename, andnoncefields must all be present. Parse these from theimetatag usinggetFileMetadataFromImetaTagfrom applesauce, then cast/extend to MediaAttachment.