The official website is too troublesome
If you installed git, there is an openssl.exe in it that
can be used directly
The following is an easy installation method
https://slproweb.com/products/Win32OpenSSL.html
I am Win10, this
Win64 OpenSSL v3.1.1,
select the following,
and do not select all sponsorships below.
Configure environment variables,
configure Path variables,
enter
openssl version on the command line
, and the version number will be displayed. The
installation is successful
. Node has a crypto package that is specially used to calculate encryption but does not support crc
chatgpt's explanation is that
the crypto package in Node.js mainly provides security functions such as encryption, hashing, and pseudo-random number generation, while the CRC (Cyclic Redundancy Check) algorithm is usually used for data integrity verification and does not belong to the category of traditional cryptography. Therefore, the crypto package in Node.js does not provide CRC algorithm implementation, but the CRC check function can be implemented through other modules or third-party libraries.
Need to install crc package
npm install crc
const crc = require('crc');
const fs = require('fs');
var a = fs.readFileSync("a.js",'utf8');
const checksum = crc.crc32(a).toString(16);
console.log(checksum);