It's Part of the Code-Examples in the README-File. "B4c0/\/" stands for 'password_example' I found out from another question here.
What means 'bacon' and 'not_bacon'?
To check a password:
```javascript
// Load hash from your password DB.
bcrypt.compareSync("B4c0/\/", hash); // true
bcrypt.compareSync("not_bacon", hash); // false
```
Auto-gen a salt and hash:
```javascript
var hash = bcrypt.hashSync('bacon', 8);
```
All I would like to know is, what these words stand for.
- "B4c0/\/"
- "bacon"
- "not_bacon"
I am just guessing and have no clue.
"B4c0/\/" === the actual password from the database
"bacon" === password input
"not_bacon" === wrong password input
Is my guess correct?
B4c0/\/is just an example of a password, such as one submitted by the user.not_baconis an example of another user-submitted password. IfcompareSyncreturns true, then the password matches the hash. IfcompareSyncreturns false, then the password doesn't match the hash.The particular strings chosen don't really matter. They only illustrate that a hash will only be validated against the password used to create the hash, and not against any old string.
Here, the hash was originally created by passing in
B4c0/\/to bcrypt.Later, when validating the user's input against the hash again, if they pass in
B4c0/\/again, it will pass.If they pass in something else that is not the hashed password, like
not_bacon, it will fail.