Skip to content
Prev Previous commit
Next Next commit
doc: equal -> strictEqual, == -> === in crypto.md
  • Loading branch information
vsemozhetbyt committed Jan 20, 2017
commit c6e9fdc1459b41eba1326c71ccb2dd29b72d77c3
6 changes: 3 additions & 3 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ const alice_secret = alice.computeSecret(bob_key);
const bob_secret = bob.computeSecret(alice_key);

// OK
assert.equal(alice_secret.toString('hex'), bob_secret.toString('hex'));
assert.strictEqual(alice_secret.toString('hex'), bob_secret.toString('hex'));
```

### diffieHellman.computeSecret(other_public_key[, input_encoding][, output_encoding])
Expand Down 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.equal(alice_secret.toString('hex'), bob_secret.toString('hex'));
assert.strictEqual(alice_secret.toString('hex'), bob_secret.toString('hex'));
// OK
```

Expand Down Expand Up @@ -1311,7 +1311,7 @@ const alice_secret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
const bob_secret = bob.computeSecret(alice.getPublicKey(), null, 'hex');

/* alice_secret and bob_secret should be the same */
console.log(alice_secret == bob_secret);
console.log(alice_secret === bob_secret);
```

### crypto.getHashes()
Expand Down