fix: don't use npm crypto

This commit is contained in:
Huskydog9988
2025-04-06 14:27:31 -04:00
parent a01a94fff2
commit 5e79eb61bc
3 changed files with 5 additions and 12 deletions
+2 -3
View File
@@ -2,8 +2,7 @@ import Stream, { Readable } from "stream";
import prisma from "../db/database";
import { applicationSettings } from "../config/application-configuration";
import objectHandler from "../objects";
import { randomUUID } from "node:crypto";
import crypto from "crypto";
import { randomUUID, createHash } from "node:crypto";
import { IncomingMessage } from "http";
class SaveManager {
@@ -50,7 +49,7 @@ class SaveManager {
let hash: string | undefined;
const hashPromise = Stream.promises.pipeline(
stream,
crypto.createHash("sha256").setEncoding("hex"),
createHash("sha256").setEncoding("hex"),
async function (source) {
// Not sure how to get this to be typed
// @ts-expect-error