Marmot-TS
    Preparing search index...

    Type Alias EncryptMediaFileResult

    Result of encryptMediaFile.

    type EncryptMediaFileResult = {
        attachment: MediaAttachment;
        encrypted: Uint8Array;
    }
    Index

    Core - Encrypted Media

    Core - Encrypted Media

    attachment: MediaAttachment

    Populated MediaAttachment ready to be passed to createImetaTagForAttachment (after setting the url field to the Blossom upload URL).

    The sha256 field contains the hex-encoded SHA-256 of the plaintext file (the x imeta field), used for integrity verification after decryption.

    The nonce field contains the hex-encoded 12-byte nonce used during encryption.

    encrypted: Uint8Array

    The encrypted blob. Upload this to Blossom and use SHA256(encrypted) as the blob address.