passwords

Why is crypt() generating different results?

十年热恋 提交于 2019-12-10 19:17:09
问题 Crypt is generating different hashes with the same input data, and the [following] previously functional hash generator/check is no longer working for authenticating users: public static function blowfish($password, $storedpass = false) { //if encrypted data is passed, check it against input ($info) if ($storedpass) { if (substr($storedpass, 0, 60) == crypt($password, "$2y$08$".substr($storedpass, 60))) { return true; } else { return false; } } else { //make a salt and hash it with input, and

Encryption using crypt()

只愿长相守 提交于 2019-12-10 18:54:27
问题 I'm currently doing a very safe login system, but I'm new to the crypt() function and need some quick assistance. I used crypt() to encrypt the password string during signup and saved it to the database. However, how will I be able to decrypt the key during login? Or how am I supposed to do otherwise? Or would it be possibly to do some magic with the submitted password string to compare it to the encrypted key in the database? 回答1: crypt() doesn't encrypt passwords, it hashes them. The

Using SHA256 + SHA512 hash for password?

丶灬走出姿态 提交于 2019-12-10 17:44:17
问题 I'm creating a method that I will use to hash password to store in a database. I would like to seek advice if my methods in hashing is sufficient or overkill for the task. Dim result As Byte() Dim mixer As String Try Dim sha As New SHA512CryptoServiceProvider mixer = txt_salt.Text.ToUpper + txt_pass.Text.Trim result = sha.ComputeHash(System.Text.Encoding.ASCII.GetBytes(mixer)) txt_sha.Text = Convert.ToBase64String(result) Catch ex As Exception MsgBox(ex.ToString) End Try Thanks. 回答1: It is

Is password self-encryption viable?

℡╲_俬逩灬. 提交于 2019-12-10 17:38:18
问题 I've been reading about password storage, and have basically found 2 commonly used techniques. encrypting all of the passwords stored with a single key. Using hashes Using hashes with salt. Is there a flaw in storing the password "encrypted by itself", i.e. encrypting a txt which says password1 with the password password1 without storing it unencrypted, and when a user wants to log in, decrypt, compare and grant access (or not)? I am not very literate in this topic, so, can somebody enlighten

Multiple Passwords Login: Good OR Bad

馋奶兔 提交于 2019-12-10 17:32:09
问题 I am in the quest to create the most flexible user login system I can think of, and is looking for feed back on some ideas. (system also currently has an OpenID integration option) I was in the process of revising one of my user login systems and the concept just hit me... Allot of people have trouble remembering a single password, majority of people I know have a few passwords they use from site to site just so they can remember them. Would allowing users to set multiple passwords ( can be

yesod — password protecting staging site

寵の児 提交于 2019-12-10 17:24:25
问题 I'm trying to set up a staging instance of my yesod webserver, and I was wondering if there were some easy way to make the entire site password protected. Specifically, I want to be able to prompt those who navigate to my site for credentials. After they authenticate it should function as the typical site. But if they cannot authenticate themselves they should see nothing. 回答1: To expand on @MichaelSnoyman's answer, here's how I implemented the WAI HTTP Auth middleware: From the scaffolded

What is being encrypted when I use a salted CRYPT_MD5 to encrypt my password?

故事扮演 提交于 2019-12-10 17:16:34
问题 Using md5 on a string always produces an alpha-numeric encrypted result, ie: no symbols. However, when I using the php crypt() function, specifically the CRYPT_MD5 (and it is on, I've checked) with a salt, the supposed md5 hash it returns does not look like an md5 hash. For example: if I md5 the string 'password', I get: $pass = md5('password'); echo $pass; //5f4dcc3b5aa765d61d8327deb882cf99 if I use CRYPT_MD5, which is denoted by the '$1$' prefix and the '$' suffix with the salt being 'salt'

<input type=“password” …> styling with jQuery

ε祈祈猫儿з 提交于 2019-12-10 16:40:35
问题 Is this possible to change the default styling of password field? I mean replacing the default stars-symbols with something like • or etc. jQuery or simply css/html? Thanx. 回答1: Take a look at this article: http://blog.decaf.de/2009/07/iphone-like-password-fields-using-jquery/ 回答2: The masking characters are set by the browser and operating system and you can't customize them with CSS. Here's a thread that covers it more. You could fake it, but it will break if JavaScript is disabled. 来源:

How to print password combination (but with custom constraints for each index)

◇◆丶佛笑我妖孽 提交于 2019-12-10 15:54:58
问题 I am trying to build a dynamic password recovery tool. You can specify a password, and an unknown character list which correspond to unknown password indexes. So, if you remember 90% of your password, and can't remember a few letters, this will do a light weight brute force for you. I am able to combine the user supplied password with an unknown character list; however, I am stuck trying to print every potential password. I am stuck here: password = 'Dude123' charList = ['d8','vV','','D8','',

Updating Subversion servers configuration file is not working

北慕城南 提交于 2019-12-10 15:34:47
问题 I'm trying to update my Subversion configuration so that it won't store passwords in plaintext. I understand that you need to update the configuration in the ~/.subversion/servers file to prevent this by adding a line: "store-plaintext-passwords = no". I've done this, but my Subversion client continues to show me the standard warning: ———————————————————————————————————- ATTENTION! Your password for authentication realm: RainStorm Subversion Repository can only be stored to disk unencrypted!