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 and modernize code examples in crypto.md #10909

Closed
wants to merge 8 commits into from
2 changes: 1 addition & 1 deletion doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ const bob_key = bob.generateKeys();
const alice_secret = alice.computeSecret(bob_key);
const bob_secret = bob.computeSecret(alice_key);

assert(alice_secret, bob_secret);
assert.equal(alice_secret.toString('hex'), bob_secret.toString('hex'));
Copy link
Member

@lpinca lpinca Jan 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: assert.strictEqual()? Not sure if it is preferred on doc examples.

Edit: nvm fixed in next commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion, I've tried to do it step by step and to split by topics)

// OK
```

Expand Down