This commit is contained in:
cirroskais 2024-07-26 01:18:24 -04:00
parent 83e70a4322
commit 136f3caa0a
No known key found for this signature in database
GPG key ID: 5FC73EBF2678E33D

View file

@ -1,6 +1,6 @@
import { createCipheriv, createDecipheriv, scrypt, randomBytes } from "node:crypto"; import { createCipheriv, createDecipheriv, scrypt, randomBytes } from "node:crypto";
const KEY = ((await scryptAsync(process.env.ENCRYPTION_KEY, 32)) as Buffer).toString("hex"); const KEY = (await scryptAsync(process.env.ENCRYPTION_KEY, 32)) as Buffer;
function scryptAsync(password: string, length: number) { function scryptAsync(password: string, length: number) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {