"""Public "share by link" helpers for the download center. A DownloadLink is a capability URL: the unguessable token grants anyone read access to one download's file, or to the files in one of its owner's own folders (`folder_files`), on the login-free `/watch/{token}` page. So the token is never stored as written: the link is found by its SHA-256, and the owner's copy is Fernet-encrypted — a database copy alone opens nothing. Without that copy (no TOKEN_ENCRYPTION_KEY, or a key since changed) the link still opens; only its address cannot be shown again, and the owner makes a new link to share. Password-protected links additionally require a short-lived signed **grant** on the file request — because a `