crypto(加密和哈希算法)
MD5
const crypto = require("crypto");
const hash = crypto.createHash("md5");
hash.update("hello world");
console.log(hash.digest('hex'));
console.log("----------------------------");
SHA1
const crypto = require("crypto");
const sha1 = crypto.createHash("sha1");
sha1.update("hello world");
console.log(sha1.digest('hex'));
console.log("----------------------------");
Hmac
const crypto = require("crypto");
const hamc = crypto.createHmac("sha256","secret-key");
hamc.update("hello world");
console.log(hamc.digest("hex"));
console.log("----------------------------");
AES
const c