Easy installation of OpenSSL

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,
insert image description here
select the following,
and do not select all sponsorships below.
insert image description here
Configure environment variables,
configure Path variables,
insert image description here
enter
openssl version on the command line
, and the version number will be displayed. The
insert image description here
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);

Guess you like

Origin blog.csdn.net/qq_38913715/article/details/130973204