加解密工具 jBCrypt

码农软件 · 软件分类 · 加密/解密软件包 · 2019-09-30 23:43:19

软件介绍

java版Bcrypt ,加解密工具 (用于账号密码加密,被时间检证过了) ,对用户的口令进行Hash,并使用salt,以防止Rainbow 攻击(Hash算法可用MD5或SHA1等,对口令使用salt的意思是,user 在设定密码时,system 产生另外一个random string(salt)。在datbase 存的是与salt + passwd 产的md5sum 及salt。 当要验证密码时就把user 输入的string 加上使用者的salt,产生md5sum 来比对。 理论上用salt 可以大幅度让密码更难破解,相同的密码除非刚好salt 相同,最后存在database 上的内容是不一样的。使用慢一点的Hash算法来保存口令,如 bcrypt (被时间检证过了) 或是 scrypt (更强,但是也更新一些)

The API is very simple: 

// Hash a password for the first time 

String hashed = BCrypt.hashpw(password, BCrypt.gensalt()); 

// gensalt's log_rounds parameter determines the complexity 

// the work factor is 2**log_rounds, and the default is 10 

String hashed = BCrypt.hashpw(password, BCrypt.gensalt(12)); 

// Check that an unencrypted password matches one that has 

// previously been hashed 

if (BCrypt.checkpw(candidate, hashed)) 

 System.out.println("It matches"); 

else 

 System.out.println("It does not match");

本文地址:https://www.codercto.com/soft/d/15771.html

JUnit Recipes中文版

JUnit Recipes中文版

陈浩等译 / 电子工业 / 2006-9 / 69.00元

《JUnit Recipes中文版:程序员实用测试技巧》主要介绍了在Java开发中使用JUnit进行单元测试的各种方法、原则、技巧与实践。本书出自开发一线专家之手,本着实用的原则,涵盖各类Java开发中应用JUnit的实用技巧,内容丰富、全面深入;无论对于需要应用JUnit进行单元测试的一线Java开发人员,还是JUnit入门、进阶者,本书都是一本不可多得的实用指南。这本书介绍了大量的JUnit实......一起来看看 《JUnit Recipes中文版》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具