pub fn publish_share(
wrapped: &WrappedScope,
fragment_secret: &[u8; 32],
opaque_id: &[u8; 16],
expires_at: Option<String>,
assets: Vec<SharedAsset>,
) -> Result<SharePublication, SharingError>Expand description
Prepare everything the server needs to serve a link whose scope is already encapsulated
(wrapped, from encapsulate_scope under the same fragment_secret and opaque_id).
Decides where the scope travels: a link-only scope goes inside the sealed record, a passphrase
scope goes to SharePublication::wrapped_secret and nowhere else. The record is sealed under
the fragment-derived metadata key, so it opens with the URL alone.
ยงErrors
SharingError::Malformed when assets breaks the wrapped_file_key-iff-wrapped rule,
and SharingError::Crypto when a record cannot be serialized.