Zum Inhalt springen

Weak hash (ARCH3111)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key typescript.security.weak-hash · Severity error · Category security · CWE CWE-328

Using cryptographically broken hash algorithms like MD5 or SHA-1 for security purposes leaves you vulnerable to collision attacks.

import { createHash } from "crypto";
const digest = createHash("md5").update(data).digest("hex");
import { createHash } from "crypto";
const digest = createHash("sha256").update(data).digest("hex");

Use SHA-256 or a stronger algorithm instead of MD5/SHA-1.