-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FG_Day_3 #4
base: master
Are you sure you want to change the base?
FG_Day_3 #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eleganckie rozwiązanie
algorithm.forEach( algorithmElem => { | ||
const hash = crypto.createHmac(algorithmElem, passwordElem) | ||
.digest('hex'); | ||
hash === MY_PWD_HASH ? console.log(`password: ${passwordElem}; algorithm: ${algorithmElem}`) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bardzo fajne rozwiązanie. Mała podpowiedź: nieco czytelniejszy były tu if
.
} catch(err) { | ||
console.log("You are a weak hacker."); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bardzo elegancko!
No description provided.