/** * 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-sha1-hash * Detects sha1() usage from crypto-hash package * CWE-327: SHA-1 is cryptographically broken * * The crypto-hash package itself warns: "SHA-1 is insecure and should not be used" * @see https://www.npmjs.com/package/crypto-hash */ import type { TSESLint } from '@interlace/eslint-devkit'; type MessageIds = 'sha1Deprecated' | 'useSha256' | 'useSha512'; export interface Options { /** Allow SHA1 in test files. Default: false */ allowInTests?: boolean; } type RuleOptions = [Options?]; export declare const noSha1Hash: TSESLint.RuleModule & { name: string; }; export type { Options as NoSha1HashOptions };