This code generates a SHA-256 hash for a file by prompting the user to enter the file path, reading the file into a buffer using the fs module, and then calculating the hash using the crypto module. The hash is output to the console and the program is terminated.
nodejs
crypto
hash
sha256
hash-algorithm
hash-generator
file-checksum
file-hash
file-security
file-integrity-check
-
Updated
Dec 27, 2022 - JavaScript