Skip to main content

Node.js Hash计算

· One min read
Alan

计算hash值:

import crypto from "crypto";

const clearText = "待计算文本";
const hashValue = crypto.createHash("sha256").update(clearText).digest("hex");