From c730f4aef49d9fe20bfa41428325c72a6c7ba140 Mon Sep 17 00:00:00 2001 From: Prakash Kumar <38276550+ThePrakashKumar@users.noreply.github.com> Date: Tue, 18 Feb 2020 13:58:38 +0530 Subject: [PATCH] Update hash-and-compare-passwords-synchronously.english.md (#38226) --- .../hash-and-compare-passwords-synchronously.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/06-information-security-and-quality-assurance/information-security-with-helmetjs/hash-and-compare-passwords-synchronously.english.md b/curriculum/challenges/english/06-information-security-and-quality-assurance/information-security-with-helmetjs/hash-and-compare-passwords-synchronously.english.md index 568726de8c..3703d9bb13 100644 --- a/curriculum/challenges/english/06-information-security-and-quality-assurance/information-security-with-helmetjs/hash-and-compare-passwords-synchronously.english.md +++ b/curriculum/challenges/english/06-information-security-and-quality-assurance/information-security-with-helmetjs/hash-and-compare-passwords-synchronously.english.md @@ -14,7 +14,7 @@ Hashing synchronously is just as easy to do but can cause lag if using it server var hash = bcrypt.hashSync(myPlaintextPassword, saltRounds); ``` -Add this method of hashing to your code and then log the result to the console. Again, the variables used are already defined in the server so you wont need to adjust them. You may notice even though you are hashing the same password as in the async function, the result in the console is different- this is due to the salt being randomly generated each time as seen by the first 22 characters in the third string of the hash. +Add this method of hashing to your code and then log the result to the console. Again, the variables used are already defined in the server so you won't need to adjust them. You may notice even though you are hashing the same password as in the async function, the result in the console is different- this is due to the salt being randomly generated each time as seen by the first 22 characters in the third string of the hash. Now to compare a password input with the new sync hash, you would use the compareSync method: ```js