--- id: 58a25bcff9fc0f352b528e7e title: Hash and Compare Passwords Synchronously challengeType: 2 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'getUserInput => $.get(getUserInput("url")+ "/_api/server.js") .then(data => { assert.match(data, /START_SYNC[^]*hash.*=.*bcrypt.hashSync.*myPlaintextPassword( |),( |)saltRounds[^]*END_SYNC/gi, "You should call bcrypt.hashSync on myPlaintextPassword with saltRounds"); assert.match(data, /START_SYNC[^]*result.*=.*bcrypt.compareSync.*myPlaintextPassword( |),( |)hash[^]*END_SYNC/gi, "You should call bcrypt.compareSync on myPlaintextPassword with the hash generated in the last line"); }, xhr => { throw new Error(xhr.statusText); })' ```
## Challenge Seed
## Solution
```js // solution required ```