Skip to content

Commit

Permalink
- fix: encrypt param error
Browse files Browse the repository at this point in the history
  • Loading branch information
agallardol committed Nov 2, 2023
1 parent f14a1fe commit 7e348ac
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ export async function encryptMessageWithPassphrase(
const nonce = sodium.randombytes_buf(
sodium.crypto_aead_chacha20poly1305_IETF_NPUBBYTES
);
const plaintext_bytes = sodium.from_string(message);
const ciphertext = sodium.crypto_aead_chacha20poly1305_ietf_encrypt(
plaintext_bytes,
message,
null,
null,
nonce,
Expand Down

0 comments on commit 7e348ac

Please sign in to comment.