草庐IT

bcrypted

全部标签

PHP & MySQL : using bcrypt hash and verifying password with database

我正在使用AndrewMoore先生的方法(HowdoyouusebcryptforhashingpasswordsinPHP?)对用户密码进行哈希处理。我所做的是我有一个注册页面,它使用$bcrypt=newBcrypt(12);$pass=$_POST['password'];//registerpasswordfield$hash=$bcrypt->hash($pass);//theninserts$hashintodatabasewithusersregisteredemail(I'vecheckedmymysqldatabaseanditindeedhasanhashedit

java - BCrypt.checkpw() 无效盐版本异常

我正尝试在我的Play2.1中使用BCrypt实现身份验证。Java应用程序,但在尝试对用户进行身份验证时出现无效盐版本异常。这是我的堆栈跟踪play.api.Application$$anon$1:Executionexception[[IllegalArgumentException:Invalidsaltversion]]atplay.api.Application$class.handleError(Application.scala:289)~[play_2.10.jar:2.1.0]atplay.api.DefaultApplication.handleError(Appl

python - py-bcrypt 安装在 win 7 64 位 python 上

尝试在win7上安装py-bcrypt。Python是64位的。第一个错误无法找到vcvarsall.bat。谷歌了一下得知我需要安装mingw。现在安装它C:\tools\python_modules\py-bcrypt-0.2>pythonsetup.pybuild-cmingw32runningbuildrunningbuild_pyrunningbuild_extbuilding'bcrypt._bcrypt'extensionC:\MinGW\bin\gcc.exe-mno-cygwin-mdll-O-Wall-Ic:\Python27\include-Ic:\Python2

python - flask-bcrypt - ValueError : Invalid salt

我正在使用Flask和flask-Bcrypt完成一个简单的用户登录。但是,当尝试使用存储在我的数据库中的用户登录时,我不断收到此错误ValueError:Invalidsalt模型.pyclassUser(db.Model):__tablename__="users"id=db.Column(db.Integer,primary_key=True)name=db.Column(db.String,nullable=False)email=db.Column(db.String,nullable=False)password=db.Column(db.String,nullable=F

c# - 为什么 BCrypt.net GenerateSalt(31) 会立即返回?

我在阅读JeffAtwood'spostaboutstoringpasswords后偶然发现了BCrypt.net这让我想到了ThomasPtacek对useBCrypt的建议存储密码。这最终让我找到了thisC#implementationofBCrypt在上面最后一个链接的评论中,有人问“为什么GenerateSalt(30)需要永远,但GenerateSalt(31)似乎根本不需要时间?”我运行了BCrypt.HashPassword(password,BCrypt.GenerateSalt(31))并在0毫秒内得到了结果。我已经运行BCrypt.HashPassword("pa

c# - BCrypt 是一种在 C# 中使用的好哈希算法吗?我在哪里可以找到它?

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。关闭5年前。Improvethisquestion我了解到,在对密码进行哈希处理时,许多程序员建议使用BCrypt算法。我正在用C#编程,想知道是否有人知道BCrypt的良好实现?我找到了thispage,但我真的不知道它是不是假的。选择密码哈希方案时应该注意什么?BCrypt是一个“好的”实现吗?

go - 真的不需要为 bcrypt 生成盐吗?

我正在使用golang.org/x/crypto/bcrypt包来存储密码。查看文档和其他SO问题,似乎我不应该(或者至少不必)在生成哈希之前为密码生成盐。这似乎与我读过的有关密码学和现代密码存储的所有内容背道而驰,让我有点紧张。将用户的普通密码传递给bcrypt.GenerateFromPassword是否真的足够安全,还是我读错了? 最佳答案 bcrypt包generatesthesalt为申请。GenerateFromPassword的返回值对密码的成本、salt和哈希进行编码。

go - Bcrypt hashedSecret 太短,不能成为 bcrypted 密码

我想使用Go创建一个用户身份验证系统,但我无法登录帐户。我使用bcrypt来散列密码,然后将其保存到数据库(MySQL)。当我想将它与插入的密码进行比较时,就会出现问题。我有这个错误:hashedSecret太短,不能成为bcrypted密码。我不知道我做错了什么。这是我的代码:models.gotypeUserstruct{IDstring`json:"id"`Usernamestring`json:"username"`Passwordstring`json:"password"`IsAdminbool`json:"is_admin"`}user-routes.go(登录函数)er

go - 2018 年使用哪种 bcrypt 成本?

更新实际上,基准测试似乎设置不正确我遵循了resourceshared由用户@LukeJoshuaPark开发,现在可以使用了。packagemainimport"testing"funcbenchmarkBcrypt(iint,b*testing.B){forn:=0;n输出:BenchmarkBcrypt9-43039543095ns/opBenchmarkBcrypt10-42079184657ns/opBenchmarkBcrypt11-410158688315ns/opBenchmarkBcrypt12-45316070133ns/opBenchmarkBcrypt13-42

hash - 加密/bcrypt : hashedPassword is not the hash of the given password

我加密用户的密码并保存到数据库。然后用户登录,比较散列密码和普通密码,我得到crypto/bcrypt:hashedPasswordisnotthehashofthegivenpassword错误。怎么了?funcencryptPassword(passwordstring)(string,error){bytePass:=[]byte(password)hashedPassword,err:=bcrypt.GenerateFromPassword(bytePass,bcrypt.DefaultCost)iferr!=nil{log.Printf("ERROR:EncryptPassw