VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-decipher-update-method/

⇱ Node.js decipher.update() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js decipher.update() Method

Last Updated : 3 Feb, 2023

The decipher.update() method is an inbuilt application programming interface of class Decipher within crypto module which is used to update the decipher with the data according to the given encoding format.

Syntax:

const decipher.update(data[, inputEncoding][, outputEncoding])

Parameters: This method takes the following parameter:

  • data: It is used to update the decipher by new content.
  • inputEncoding: Input encoding format.
  • outputEncoding: Output encoding format.

Return Value: This method does not return any value.

Example 1: Filename: index.js

Output:

buffer :- some clear text data

Example 2: Filename: index.js

Output:

buffer :- [object Object]

Run the index.js file using the following command:

node index.js

Reference: https://nodejs.org/dist/latest-v12.x/docs/api/crypto.html#crypto_decipher_update_data_inputencoding_outputencoding

Comment

Explore