How to use the getCurves function from crypto
Find comprehensive JavaScript crypto.getCurves code examples handpicked from public code repositorys.
193 194 195 196 197 198 199 200 201 202 203 204
// Test ECDH. test(crypto.generateKeyPairSync('ec', { namedCurve: 'secp256k1' }), crypto.generateKeyPairSync('ec', { namedCurve: 'secp256k1' })); const not256k1 = crypto.getCurves().find((c) => /^sec.*(224|384|512)/.test(c)); assert.throws(() => { test(crypto.generateKeyPairSync('ec', { namedCurve: 'secp256k1' }), crypto.generateKeyPairSync('ec', { namedCurve: not256k1 })); }, {
0
0
0
+ 7 other calls in file
crypto.createHash is the most popular function in crypto (882 examples)