CNode

请教比较好用(主流)的md5库

问答
AajaxQWER发布于10 年前最后回复10 年前4 回复7965 浏览0 收藏

自己在做一个项目玩,以前的密码从来没有考虑过加密问题,现在想做md5加密,不知道https://github.com/blueimp/JavaScript-MD5/blob/master/README.md这个框架是不是大家都在用的,或求介绍一个:)

查看回复

回复 (4)

C
CoderIvan#1·10 年前

Nodejs 原生有API

const crypto = require('crypto')

const hash = crypto.createHash('md5')

const value = hash.update(Buffer.from('ivan')).digest('hex')

console.log(value)

https://nodejs.org/dist/latest-v6.x/docs/api/crypto.html#crypto_crypto_createhash_algorithm

A
alsotang#3·10 年前
参与回复
登录后即可参与回复。登录