/** * Copyright (c) 2025 Ofri Peretz * Licensed under the MIT License. Use of this source code is governed by the * MIT license that can be found in the LICENSE file. */ /** * ESLint Rule: no-weak-hash-algorithm * Detects use of weak hash algorithms (MD5, SHA1, MD4) * CWE-327: Use of a Broken or Risky Cryptographic Algorithm * * @see https://cwe.mitre.org/data/definitions/327.html */ import type { TSESLint } from '@interlace/eslint-devkit'; type MessageIds = 'weakHashAlgorithm' | 'useSha256' | 'useSha512' | 'useSha3'; export interface Options { /** Additional weak algorithms to detect. Default: [] */ additionalWeakAlgorithms?: string[]; /** Allow weak hashes in test files. Default: false */ allowInTests?: boolean; } type RuleOptions = [Options?]; export declare const noWeakHashAlgorithm: TSESLint.RuleModule & { name: string; }; export type { Options as NoWeakHashAlgorithmOptions };