diff --git a/project/package.json b/project/package.json index 30148481..bd3debaa 100644 --- a/project/package.json +++ b/project/package.json @@ -36,7 +36,6 @@ }, "dependencies": { "atomically": "2.0.3", - "buffer-crc32": "~1.0", "date-fns": "~3.6", "date-fns-tz": "~3.1", "fs-extra": "11.2.0", diff --git a/project/src/utils/HashUtil.ts b/project/src/utils/HashUtil.ts index a9e3deb0..9342cf35 100644 --- a/project/src/utils/HashUtil.ts +++ b/project/src/utils/HashUtil.ts @@ -1,6 +1,6 @@ import crypto, { webcrypto } from "node:crypto"; +import { crc32 } from "node:zlib"; import { TimeUtil } from "@spt/utils/TimeUtil"; -import crc32 from "buffer-crc32"; import { mongoid } from "mongoid-js"; import { inject, injectable } from "tsyringe"; import { FileSystemSync } from "./FileSystemSync"; @@ -38,7 +38,7 @@ export class HashUtil { } public generateCRC32ForFile(filePath: string): number { - return crc32.unsigned(this.fileSystemSync.read(filePath)); + return crc32(this.fileSystemSync.read(filePath)); } /** * Create a hash for the data parameter