Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我的学习日志(六) #7

Open
3 tasks done
xxxgitone opened this issue Jun 8, 2017 · 0 comments
Open
3 tasks done

我的学习日志(六) #7

xxxgitone opened this issue Jun 8, 2017 · 0 comments

Comments

@xxxgitone
Copy link
Owner

xxxgitone commented Jun 8, 2017

今天依旧是常规学习,没有课了,有充足的时间学习 🔥

除了代码编写,每天花很多时间来巩固基础知识,在编写代码和逻辑处理过程中发现基础知识还有很多并不是很清楚

  • 三个小时英语学习
  • 探索_proto_prototype之间的关系,还在总结当中
  • vnpastime项目编写,密码加密,个人菜单模块

今天算是加深了对原型的理解了,可以用一张图来表示

原型

密码加密

密码常见的加密的方式有md5、bcrypt、sha1,我在项目中使用的是bcrypt加密

node有一个包bcryptjs,安装使用即可

// 加密
var bcrypt = require('bcryptjs');
var salt = bcrypt.genSaltSync(10);
var hash = bcrypt.hashSync("B4c0/\/", salt);

// 判断是否相等
bcrypt.compareSync("B4c0/\/", hash); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant