andywer / andywer/threads.js

docs: insecure example

Ouverte
#369 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
documentation
Langage dominant
TypeScript
Étoiles
3.5k
Forks
173
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

The current Quick Start guide shows an example where a password is hashed using SHA-256 - https://threads.js.org/getting-started

This is not a secure example, and may lead readers without a meter for secure code to copy-paste the example.

- SHA-256 is a *fast* cryptographic hash, and not a key derivation function (like bcrypt or scrypt)
- This means it is NOT suited to "hashing" passwords

_I would suggest using another example entirely that doesn't rely on password hashing_, but if you **must** use it, use the PBKDF2 algorithm from SubtleCrypto to derive a key from the user input, with sufficient rounds.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.