node/lib/internal/crypto
Rich Trott ed72d83802
crypto: simplify KeyObject constructor
Inline a function that only gets called in the constructor. Make call to
`super()` more straightforward in the process by removing conditional
involving the function as it only ever returns `undefined` or else
throws. That made the code a little hard to understand, as without
looking at the function, one would likely expect it to return `true`
on success rather than `undefined`.

PR-URL: https://github.com/nodejs/node/pull/35064
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-09-28 10:59:33 +02:00
..
certificate.js
cipher.js
diffiehellman.js crypto: generator must be int32 in DiffieHellman() 2020-05-13 17:52:57 +02:00
hash.js
keygen.js
keys.js crypto: simplify KeyObject constructor 2020-09-28 10:59:33 +02:00
pbkdf2.js
random.js crypto: improve invalid arg type message for randomInt() 2020-09-22 23:48:13 +02:00
scrypt.js
sig.js tools: enable no-else-return lint rule 2020-07-14 12:13:31 -07:00
util.js crypto: move typechecking for timingSafeEqual into C++ 2020-09-22 10:21:00 +02:00