import crypto from "node:crypto";
/**
 * Calculates the SHA-256 hash of a file's content.
 */
export async function hashFile(fs, path) {
    const content = await fs.readFileBuffer(path);
    const hash = crypto.createHash("sha256");
    hash.update(content);
    return hash.digest("hex");
}
/**
 * Calculates the SHA-256 hash of a string.
 */
export function hashString(content) {
    const hash = crypto.createHash("sha256");
    hash.update(content);
    return hash.digest("hex");
}
