Lines Matching refs:crypto
26 common.skip('missing crypto');
30 ['crypto.createCipher is deprecated.', 'DEP0106'],
35 const crypto = require('crypto');
97 () => crypto.createHash('sha1').update({ foo: 'bar' }),
121 const cryptoCiphers = crypto.getCiphers();
122 assert(crypto.getCiphers().includes('aes-128-cbc'));
126 const { ivLength, keyLength, mode } = crypto.getCipherInfo(algo);
132 crypto.createCipheriv(algo,
133 crypto.randomBytes(keyLength),
134 crypto.randomBytes(ivLength || 0),
148 assert.notStrictEqual(crypto.getHashes().length, 0);
149 assert(crypto.getHashes().includes('sha1'));
150 assert(crypto.getHashes().includes('sha256'));
151 assert(!crypto.getHashes().includes('SHA1'));
152 assert(!crypto.getHashes().includes('SHA256'));
153 assert(crypto.getHashes().includes('RSA-SHA1'));
154 assert(!crypto.getHashes().includes('rsa-sha1'));
155 validateList(crypto.getHashes());
157 for (const algo of crypto.getHashes())
158 crypto.createHash(algo);
161 assert.notStrictEqual(crypto.getCurves().length, 0);
162 assert(crypto.getCurves().includes('secp384r1'));
163 assert(!crypto.getCurves().includes('SECP384R1'));
164 validateList(crypto.getCurves());
175 testImmutability(crypto.getCiphers);
177 testImmutability(crypto.getHashes);
178 testImmutability(crypto.getCurves);
191 () => crypto[funcName]('aes192', 'test').update('0', 'hex'),
206 () => crypto.createHash('sha1').update('0', 'hex'),
215 () => crypto.createHmac('sha256', 'a secret').update('0', 'hex'),
233 crypto.createSign('SHA256').update('test').sign(priv);
261 crypto.createSign('sha1').sign(sha1_privateKey);
272 // Throws crypto error, so there is an opensslErrorStack property.
281 console.log(crypto.randomBytes(16));
297 const hash = crypto.createHash('sha256', options);