Lines Matching refs:crypto
7 const crypto = require('crypto'); constant
11 const dh1 = crypto.createDiffieHellman(common.hasFipsCrypto ? 1024 : 256);
13 const dh2 = crypto.createDiffieHellman(p1, 'buffer');
26 assert.throws(() => crypto.createDiffieHellman(13.37), {
33 assert.throws(() => crypto.createDiffieHellman('abcdef', 13.37), {
41 assert.throws(() => crypto.createDiffieHellman(bits), {
51 crypto.createDiffieHellman('abcdef', g);
52 crypto.createDiffieHellman('abcdef', 'hex', g);
61 assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
62 assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
65 crypto.createDiffieHellman('abcdef', Buffer.from([2])); // OK
75 assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
76 assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
80 const DiffieHellman = crypto.DiffieHellman;
87 const DiffieHellmanGroup = crypto.DiffieHellmanGroup;
95 const ECDH = crypto.ECDH;
108 () => crypto.createDiffieHellman(input),
121 const dh3 = crypto.createDiffieHellman(p1, 'buffer');
137 const dh4 = crypto.createDiffieHellman(p1, 'buffer');
159 const c = crypto.createDecipheriv('aes-128-ecb', crypto.randomBytes(16), '');
166 const c = crypto.createDecipheriv('aes-128-ecb', crypto.randomBytes(16), '');
177 const alice = crypto.createDiffieHellmanGroup('modp5');
178 const bob = crypto.createDiffieHellmanGroup('modp5');
188 const modp2 = crypto.createDiffieHellmanGroup('modp2');
206 const exmodp2 = crypto.createDiffieHellman(modp2buf, Buffer.from([2]));
219 const exmodp2 = crypto.createDiffieHellman(buf, '02', 'hex');
230 const exmodp2 = crypto.createDiffieHellman(modp2buf, '\x02');
241 const exmodp2 = crypto.createDiffieHellman(modp2buf, 2);
257 crypto.createDiffieHellman(p, 'hex');
260 const bad_dh = crypto.createDiffieHellman('02', 'hex');
263 const availableCurves = new Set(crypto.getCurves());
264 const availableHashes = new Set(crypto.getHashes());
269 crypto.createECDH('Oakley-EC2N-3');
270 crypto.createHash('sha256');
275 const ecdh1 = crypto.createECDH('prime256v1');
276 const ecdh2 = crypto.createECDH('prime256v1');
301 const ecdh3 = crypto.createECDH('secp256k1');
313 const ecdh4 = crypto.createECDH('prime256v1');
323 const ecdh5 = crypto.createECDH('secp256k1');
413 const curve = crypto.createECDH('prime256v1');
431 crypto.createSign('SHA256').sign(ecPrivateKey);
436 () => crypto.createECDH(),
446 crypto.getDiffieHellman('unknown-group');
458 crypto.getDiffieHellman('modp1').setPrivateKey('');
467 crypto.getDiffieHellman('modp1').setPublicKey('');
475 () => crypto.createDiffieHellman('', true),