Skip to content

Commit

Permalink
chore: thats why you need Buffer.from there
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Nov 17, 2024
1 parent add2258 commit 9aa6e7f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/voice/src/receive/VoiceReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,14 @@ export class VoiceReceiver {

case 'aead_xchacha20_poly1305_rtpsize': {
// Combined mode expects authtag in the encrypted message
return methods.crypto_aead_xchacha20poly1305_ietf_decrypt(
Buffer.concat([encrypted, authTag]),
header,
nonce,
secretKey,
return Buffer.from(
methods.crypto_aead_xchacha20poly1305_ietf_decrypt(
Buffer.concat([encrypted, authTag]),
header,
nonce,
secretKey,
),
);

// TODO: the secretbox method says it always returns a buffer, so why was this needed?
// return Buffer.from(decrypted);
}

default: {
Expand Down

0 comments on commit 9aa6e7f

Please sign in to comment.