Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix CCM cipher example in MJS #39949

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions doc/api/crypto.md
Expand Up @@ -5260,8 +5260,7 @@ const receivedPlaintext = decipher.update(ciphertext, null, 'utf8');
try {
decipher.final();
} catch (err) {
console.error('Authentication failed!');
return;
throw new Error('Authentication failed!');
tniessen marked this conversation as resolved.
Show resolved Hide resolved
}

console.log(receivedPlaintext);
Expand Down Expand Up @@ -5305,8 +5304,7 @@ const receivedPlaintext = decipher.update(ciphertext, null, 'utf8');
try {
decipher.final();
} catch (err) {
console.error('Authentication failed!');
return;
throw new Error('Authentication failed!');
tniessen marked this conversation as resolved.
Show resolved Hide resolved
}

console.log(receivedPlaintext);
Expand Down