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:
parent
468ffed1b4
commit
6be6d9099c
@ -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",
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user