Lines Matching refs:crypto
7 const crypto = require('crypto'); constant
16 const a1 = crypto.createHash('sha1').update('Test123').digest('hex');
17 const a2 = crypto.createHash('sha256').update('Test123').digest('base64');
18 const a3 = crypto.createHash('sha512').update('Test123').digest(); // buffer
19 const a4 = crypto.createHash('sha1').update('Test123').digest('buffer');
22 let a5 = crypto.createHash('sha512');
26 let a6 = crypto.createHash('sha512');
33 let a7 = crypto.createHash('sha512');
37 let a8 = crypto.createHash('sha512');
45 const a0 = crypto.createHash(cryptoType).update('Test123').digest(digest);
91 const h1 = crypto.createHash('sha1').update('Test123').digest('hex');
92 const h2 = crypto.createHash('sha1').update('Test').update('123').digest('hex');
97 const sha1Hash = crypto.createHash('sha1');
111 crypto.createHash('xyzzy');
117 () => crypto.createHash('sha256').digest({
128 () => crypto.createHash('sha256').update(),
137 const hutf8 = crypto.createHash('sha512').update('УТФ-8 text').digest('hex');
145 crypto.createHash('sha512').update('УТФ-8 text', 'latin1').digest('hex'));
147 const h3 = crypto.createHash('sha256');
165 crypto.createHash('sha256').update('test').digest('ucs2'),
166 crypto.createHash('sha256').update('test').digest().toString('ucs2'));
169 () => crypto.createHash(),
179 const Hash = crypto.Hash;
180 const instance = crypto.Hash('sha256');
188 assert.strictEqual(crypto.createHash('shake128').digest('hex'),
190 assert.strictEqual(crypto.createHash('shake128', null).digest('hex'),
192 assert.strictEqual(crypto.createHash('shake256').digest('hex'),
195 assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 })
202 assert.strictEqual(crypto.createHash('shake128', { outputLength: 0 })
205 assert.strictEqual(crypto.createHash('shake128', { outputLength: 5 })
209 assert.strictEqual(crypto.createHash('shake128', { outputLength: 5 })
212 assert.strictEqual(crypto.createHash('shake128', { outputLength: 0 })
216 assert.strictEqual(crypto.createHash('shake128', { outputLength: 15 })
219 assert.strictEqual(crypto.createHash('shake256', { outputLength: 16 })
224 assert.strictEqual(crypto.createHash('shake128', { outputLength: 128 })
234 const superLongHash = crypto.createHash('shake256', {
243 assert.strictEqual(crypto.createHash('sha224', { outputLength: 28 })
250 crypto.createHash('sha256', { outputLength: 28 });
256 assert.throws(() => crypto.createHash('sha256', { outputLength }),
261 assert.throws(() => crypto.createHash('sha256', { outputLength }),
267 const h = crypto.createHash('sha512');
274 const a = crypto.createHash('sha512').update('abc');
277 const d = crypto.createHash('sha512').update('abcdef');