Mayank Agarwal has Published 373 Articles

crypto.generateKeyPair() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:30:25

2K+ Views

The crypto.generateKeyPair() can be used to generate a new asymmetric key pair of the specified type. Supported types for generating key pair are: RSA, DSA, EC, Ed25519, Ed448, X25519, X448 and DH. The function behaves as if keyObject.export has been called on its result when a publicKeyEncoding or privateKeyEncoding is ... Read More

crypto.createVerify() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:26:22

814 Views

The crypto.createVerify() will create and return a verify object that uses the passed algorithm in the parameter. One can use, crypto.getHashes() to get the names of all the available signing algorithms. You can create a Verify instance by using the name of the signature algorithms such as 'RHA-SHA256' only in ... Read More

crypto.createSign() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:23:51

327 Views

The crypto.createSign() will create and return a sign object tha uses the passed algorithm in the parameter. One can use, crypto.getHashes() to get the names of all the available digest algorithms. You can create a Sign instance by using the name of the signature algorithms such as 'RHA-SHA256' only in ... Read More

crypto.createECDH() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:20:47

450 Views

The crypto.createECDH() is used to create an elliptic curve also known as Elliptic Curve Diffie-Hellman i.e ECDH that uses a curve predefined by the input parameter curveName. You can use crypto.getCurves to get the list of all the available curve names. This method is part of the 'crypto' module.Syntaxcrypto.createECDH(curveName)ParametersThe above ... Read More

crypto.createDiffieHellmanGroup() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:20:24

126 Views

The crypto.createDiffieHellmanGroup() is used for creating the DiffieHellmanGroup. This method can also be referred as an alias for crypto.getDiffieHellman.Syntaxcrypto.createDiffieHelmmanGroup(name)ParametersThe above parameters are described as below −name – It takes the input for the group name. The input is of type 'string'.ExampleCreate a file with name – diffieHellmanGroup.js and copy the below ... Read More

crypto.createDecipheriv() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:20:01

2K+ Views

The crypto.createCipheriv() is a programming interface from the 'crypto' module. It will create and return the Decipher object as per the given algorithm, key, iv and options passed in the function.Syntaxcrypto.createDecipheriv(algorithm, key, iv, [options])ParametersThe above parameters are described as below −algorithm – It takes the input for the algorithm that would ... Read More

crypto.createCipheriv() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:19:36

5K+ Views

The crypto.createCipheriv() method will first create and then return the cipher object as per the algorithm passed for the given key and authorization factor (iv).Syntaxcrypto.createCipheriv(algorithm, key, iv, options)ParametersThe above parameters are described as below −algorithm – It takes the input for the algorithm that would be used to create the cipher. ... Read More

cipher.update() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:09:13

655 Views

The cipher.update() is used to update the cipher with the receivd data according to the given encoding format. It is one of the inbuilt method that is provided by the class Cipher within the crypto module. If an input encoding is specified, the data argument is a string, else the ... Read More

cipher.final() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:08:48

773 Views

The cipher.final() is used to return a buffer or string containing the value of cipher object. It is one of the inbuilt method that is provided by the class Cipher within the crypto module. If an output encoding is specified, a String is returned. If an output encoding is not ... Read More

async.queue() Method in Node.js

Mayank Agarwal

Mayank Agarwal

Updated on 20-May-2021 12:04:02

4K+ Views

The async module provides different functionalities to work with asynchronous JavaScript in a nodejs application. The async.queue() method returns a queue that is further used for concurrent processing of processes i.e. multiple processing of items at a time/instant.Installing and Using async.queue()Step 1 − Run the following command to initialize the ... Read More

Advertisements