Skip to content
Related Articles

Related Articles

Node.js | crypto.getCurves() Method
  • Last Updated : 16 Mar, 2020

The crypto.getCurves() method is an inbuilt application programming interface of the crypto module which is used to display an array with the names of all the supported elliptic curves.



Parameters: This method doesn’t accept any parameters.

Return Value: This method returns the name of all the supported elliptic curves.

Below example illustrates the use of crypto.getCurves() method in Node.js:


// Node.js program to demonstrate the 
// crypto.getCurves() method
// Including crypto module
const crypto = require('crypto');
// Calling getCurves method
const curve = crypto.getCurves();
// Prints all the supported elliptic curves
console.log("The list of all the elliptic curves are : ", curve);


The list of all the elliptic curves are :  [ 'Oakley-EC2N-3',
  'wap-wsg-idm-ecid-wtls9' ]


Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :