diff --git a/src/utils/crypto/libsodium.ts b/src/utils/crypto/libsodium.ts index 29ae28e24..3360e322a 100644 --- a/src/utils/crypto/libsodium.ts +++ b/src/utils/crypto/libsodium.ts @@ -146,8 +146,8 @@ export async function encryptFileChunk( await sodium.ready; let tag = finalChunk - ? sodium.crypto_secretstream_xchacha20poly1305_TAG_MESSAGE - : sodium.crypto_secretstream_xchacha20poly1305_TAG_FINAL; + ? sodium.crypto_secretstream_xchacha20poly1305_TAG_FINAL + : sodium.crypto_secretstream_xchacha20poly1305_TAG_MESSAGE; const pushResult = sodium.crypto_secretstream_xchacha20poly1305_push( pushState, data,