0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 05:30:43 -05:00

Removes buffer-crc32 (#1058)

Remove `buffer-crc32` dependency and use `crc32` from `node:zlib`.

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
This commit is contained in:
Refringe 2025-01-09 15:28:33 -05:00 committed by GitHub
parent 468ffed1b4
commit 6be6d9099c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -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",

View File

@ -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