salt

WildFly: randomly salted passwords in Java EE application

邮差的信 提交于 2019-12-03 03:53:07
What is the WildFly (8.2) way to work with randomly salted passwords stored in a database? Is an implementation of org.jboss.crypto.digest.DigestCallback (in the password validation process) meant to have access to the salt part from the database? Or should I simply hash and salt passwords by my self before handing them over to the login method of HttpServletRequest ? It looks to me like the 'WildFly way' to deal with passwords is to do what most containers do and deliver a non-secure solution out-of-the-box. I don't know why, but every standard JDBC realm implementation I've seen so far just

Hashing in SHA512 using a salt? - Python

╄→гoц情女王★ 提交于 2019-12-03 03:31:04
问题 I have been looking through ths hashlib documentation but haven't found anything talking about using salt when hashing data. Help would be great. 回答1: Samir's answer is correct but somewhat cryptic. Basically, the salt is just a randomly derived bit of data that you prefix or postfix your data with to dramatically increase the complexity of a dictionary attack on your hashed value. So given a salt s and data d you'd just do the following to generate a salted hash of the data: import hashlib

Can someone point me to a good PHP/MySQL salted hashed password implementation?

帅比萌擦擦* 提交于 2019-12-03 03:19:05
After reading about salts password hashing Id like to implement a simple version for an admin area to a site Im building. If you have any good links with code that have implemented this idea well, I would appreciate it if you could share. Thanks, Registration process: User enters a password. System generates a salt value from random data (could be a hash of the time & PID or something). Systems generates a hash value of the password & salt value and stores both of these in the registration table. Login process: User enters a password. System pulls the salt value from the database and hashes it

How to stock and use a shiro's salt from database

家住魔仙堡 提交于 2019-12-03 03:11:38
I use shiro in application for the authenticate. I use hashed password with a salt and I store them in my database like this : private User createUserWithHashedPassword(String inName, String inFirstName, String inLastName, String inPassword){ ByteSource salt = randomNumberGenerator.nextBytes(32); byte[] byteTabSalt = salt.getBytes(); String strSalt = byteArrayToHexString(byteTabSalt); String hashedPasswordBase64 = new Sha256Hash(inPassword, salt, 1024).toBase64(); return new User(inName,inFirstName,inLastName,hashedPasswordBase64,strSalt); } I store the salt with a String in my database. Now

Spring Security Custom Authentication and Password Encoding

帅比萌擦擦* 提交于 2019-12-03 02:27:16
问题 Is there a tutorial out there or does anyone have pointers on how to do the following with Spring-Security? Task: I need to get the salt from my database for the authenticating username and use it to encrypt the provided password (from the login page) to compare it to the stored encrypted password (a.k.a. authenticate the user). additional information: I use a custom database structure. A UserDetails object is created via a custom UserDetailsService which in turn uses a custom DAOProvider to

Spring Security Salt

笑着哭i 提交于 2019-12-03 02:22:04
问题 I'm trying to add a salt when adding a new user/pwd, but the docs seem to be missing how to do this. Here's a basic example: <authentication-manager> <authentication-provider user-service-ref="userDetailsService"> <password-encoder hash="md5"> <salt-source user-property="username"/> </password-encoder> </authentication-provider> </authentication-manager> You can see by the example that neither a custom salt or custom password encoder is used. So, how would I wire the Salt in when adding a new

安装 pgdg 源中的 PostgreSQL 9.2

▼魔方 西西 提交于 2019-12-02 22:53:22
Ubuntu 12.04 中只提供了 PostgreSQL 8.4 和 9.1,查到 PostgreSQL 项目 自己就提供 Debian 和 Ubuntu 的源 ,而且提供 8.3, 8.4, 9.0, 9.1 和 9.2 共五个版本的,真贴心。:-) 照着步骤走下来,试图安装未遂: $ apt-get install postgresql-9.2 错误是: The following packages have unmet dependencies: postgresql-9.2 : Depends: postgresql-client-9.2 but it is not going to be installed Depends: postgresql-common (>= 135~) but 129ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. 有些莫名其妙。搜也搜不到相关内容,就好像别人完全没有类似的错误一般。跑上人家的 IRC channel: #postgresql-apt @ irc.freenode.net 去询问,让我给出 $ apt-cache policy postgresql-common 命令的输出结果。哈,我一看

Email address as password salt?

て烟熏妆下的殇ゞ 提交于 2019-12-02 22:38:01
Is it a bad idea to use an email address as the salt for a password? Archimedix EDIT: Let me refer you to this answer on Security StackExchange which explains a lot of details about password hashing and key derivation. Bottom line: Use a secure established password hashing scheme that is somehow resource-intensive to protect against brute-force attacks, but limit the number of permitted invocations to prevent denial-of-service (DoS) attacks. If your language library has a function for it, verify on upgrades that it does what it is supposed to do, especially if it's PHP. The answer below is

Does has_secure_password use any form of salting?

☆樱花仙子☆ 提交于 2019-12-02 21:33:25
I want to use has_secure_password to store encrypted passwords in the database. I can't find on the the internet if has_secure_password uses any form of salting. If it uses salting, how does it works? Can anyone clarify this for me? Thijs has_secure_password uses bcrypt-ruby . bcrypt-ruby automatically handles the storage and generation of salts for you. A typical hash from bcrypt-ruby looks like this: $2a$10$4wXszTTd7ass8j5ZLpK/7.ywXXgDh7XPNmzfIWeZC1dMGpFghd92e . This hash is split internally using the following function: def split_hash(h) _, v, c, mash = h.split('$') return v, c.to_i, h[0,

how to implement sha 512,md5 and salt encryption all for one password [duplicate]

走远了吗. 提交于 2019-12-02 21:11:02
This question already has an answer here: Secure hash and salt for PHP passwords 14 answers $pass="test" the above variable contains a password called test.I want to hash this password using sha512 md5 and salt how do i do that as ive found only benifits of salt and sha512,i allready know md5 encryption.please i need the solution as my system is vunerable and please explain it with a code example because im still attached to md5 from what ive understood by your comments and answers ive got the following code $pass="test"; $hashed_pass= openssl_digest($pass, 'sha512'); ok seems solid enough but