
๐จ๐ปโ๐ป tech lead developer ๐จ๐ปโ๐ป Never stop learning #webdev #LaravelEnthusiast https://nitter.gq/t.co/SbTeXxSNYk currently @flatchr ex @wiztopic
Paris, France
Joined June 2009
- Tweets1.2K
- Following445
- Followers101
- Likes148
Find a job:
talent.io/ref/hXijKZsQ
Cashback:
fr.igraal.com/?parrain=AG_5cโฆ
๐ฐ๐๐๐๐๐๐ข โก retweeted
How to store passwords safely in the database and how to validate a password? Letโs take a look.
๐๐ก๐ข๐ง๐ ๐ฌ ๐๐๐ ๐ญ๐จ ๐๐จ
๐น Storing passwords in plain text is not a good idea because anyone with internal access can see them.
๐น Storing password hashes directly is not sufficient because it is pruned to precomputation attacks, such as rainbow tables.
๐น To mitigate precomputation attacks, we salt the passwords.
๐๐ก๐๐ญ ๐ข๐ฌ ๐ฌ๐๐ฅ๐ญ?
According to OWASP guidelines, โa salt is a unique, randomly generated string that is added to each password as part of the hashing processโ.
๐๐จ๐ฐ ๐ญ๐จ ๐ฌ๐ญ๐จ๐ซ๐ ๐ ๐ฉ๐๐ฌ๐ฌ๐ฐ๐จ๐ซ๐ ๐๐ง๐ ๐ฌ๐๐ฅ๐ญ?
1๏ธโฃ A salt is not meant to be secret and it can be stored in plain text in the database. It is used to ensure the hash result is unique to each password.
2๏ธโฃ The password can be stored in the database using the following format: ๐ฉ๐ข๐ด๐ฉ( ๐ฑ๐ข๐ด๐ด๐ธ๐ฐ๐ณ๐ฅ + ๐ด๐ข๐ญ๐ต).
๐๐จ๐ฐ ๐ญ๐จ ๐ฏ๐๐ฅ๐ข๐๐๐ญ๐ ๐ ๐ฉ๐๐ฌ๐ฌ๐ฐ๐จ๐ซ๐?
To validate a password, it can go through the following process:
1๏ธโฃ A client enters the password.
2๏ธโฃ The system fetches the corresponding salt from the database.
3๏ธโฃ The system appends the salt to the password and hashes it. Letโs call the hashed value H1.
4๏ธโฃ The system compares H1 and H2, where H2 is the hash stored in the database. If they are the same, the password is valid.
Over to you: what other mechanisms can we use to ensure password safety?
โ
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
๐ฐ๐๐๐๐๐๐ข โก retweeted
Vous souvenezโvous quand vous avez rejoint Xย ? Moi, ouiย ! #MonAnniversaireX
๐ฐ๐๐๐๐๐๐ข โก retweeted
Your SQL query is slow and you need to create an index. But which one?
An index on a single column is wrong 99% of the time...
๐ Learn with 5 tweets why you always need a multi-column index
๐ฐ๐๐๐๐๐๐ข โก retweeted
๐ฅ Here are 4 more ways you can use JavaScript's new Promise.withResolvers() method.
Use it today. It's in every browser and can be polyfilled in 9 lines.
๐ฐ๐๐๐๐๐๐ข โก retweeted
Tip: @ChromeDevTools can now override the content of Fetch/XHR requests! Great for mocking APIs without waiting on backend changes!
This and lots more in Chrome 117: bit.ly/wnd117
Vous souvenez-vous quand vous avez rejoint Twitterย ? Moi, ouiย ! #MonAnniversaireTwitter
Very interesting article about #useMemo and #useCallback !
Take a look at "How to useMemo and useCallback: you can remove most of them" by @adevnadia developerway.com/posts/how-tโฆ
#react #webdeveloper
Vous souvenez-vous quand vous avez rejoint Twitterย ? Moi, ouiย ! #MonAnniversaireTwitter
Dear @getpostman, you save my day. With love. From Paris.
๐ฐ๐๐๐๐๐๐ข โก retweeted
Every iPhone will search itself for whatever Apple wants, or for whatever Apple is directed to want. They are inventing a world in which every product you purchase owes its highest loyalty to someone other than its owner.
edwardsnowden.substack.com/pโฆ
hello @LuccaSoftware Est-il possible de cacher sa date d'anniversaire sur son profil afin que cela n'apparaisse pas dans le trombinoscope ?
12 ans sur Twitter โค๏ธ #MyTwitterAnniversary
Cโรฉtait un plaisir de lire ses tweets... ses tweets รฉtaient brillants et intรฉressants, tu nous manque dรฉjร @MaitreMo #MaitreMรด
Du coup, on migre tous vers @signalapp ร la place de #whatsapp ?












