Safer file uploads via signature-based validation
-
Updated
Nov 8, 2025 - JavaScript
Safer file uploads via signature-based validation
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.
Web-App File Encryption / Decryption
Add a description, image, and links to the file-security topic page so that developers can more easily learn about it.
To associate your repository with the file-security topic, visit your repo's landing page and select "manage topics."