The hash.digest( ) method is an inbuilt function of the crypto module’s Hash class. This is used to create the digest of the data which is passed when creating the hash. For example, when we create a hash we first create an instance of Hash using crypto.createHash() and then we update the hash content using the update( ) function but till now we did not get the resulting hash value, So to get the hash value we use the digest function which is offered by the Hash class....
The fs.rmSync() method is used to synchronously delete a file at the given path. It can also be used recursively to remove the directory by configuring the options object. It returns undefined....
The process.exit() method is used to end the process which is running at the same time with an exit code in NodeJS....
The fs.rmdirSync() method is used to synchronously delete a directory at the given path. It can also be used recursively to remove nested directories by configuring the options object. It returns undefined.Syntax:...
The crypto.publicEncrypt() method is an inbuilt application programming interface of the crypto module which is used to encrypt the stated content of the buffer with the parameter ‘key’....
The zlib.unzip() method is an inbuilt application programming interface of the Zlib module which is used to decompress a chunk of data....
The zlib.gunzip() method is an inbuilt application programming interface of the Zlib module which is used to decompress a chunk of data....
The zlib.gzip() method is an inbuilt application programming interface of the Zlib module which is used to compress a chunk of data....
NodeJS is a JavaScript runtime that was built on top of Chrome’s V8 Engine. The traditional JavaScript is executed in browsers but with Node.js we can execute JavaScript on servers, hardware devices, etc....
The crypto.verify() is a method of the inbuilt module of node.js crypto that is used to verify the signature of data that is hashed using different kinds of hashing functions Like SHA256 algorithm etc....
The fs.chmod() method is used to change the permissions of a given path. These permissions can be specified using string constants or octal numbers that correspond to their respective file modes....
The os.hostname() method is an inbuilt application programming interface of the os module which is used to get host name of the operating system....