VOOZH about

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

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


  • Courses
  • Tutorials
  • Interview Prep

Node.js decipher.final() Method

Last Updated : 6 Apr, 2023

The decipher.final() method is an inbuilt application programming interface of class Decipher within crypto module which is used to return the buffer containing the value of decipher object.

Syntax:

const decipher.final([outputEncoding])

Parameters: This method takes the output encoding as a parameter.

Return Value: This method return the object of buffer containing the deciphered value.

Example 1: In this example, we will use decipher.final() method

Filename: index.js

Output:

some clear text data

Example 2: In this example, we will use decipher.final() method

Filename: index.js

Output:

some clear text data

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_final_outputencoding

Comment

Explore