We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8ccf4c commit 50cea71Copy full SHA for 50cea71
routes/users.js
@@ -6,7 +6,7 @@ const secret = process.env.secret;
6
7
const clientId = "c16b80e7b58a5a007157";
8
const algorithm = "aes-256-ctr";
9
-const iv = crypto.randomBytes(16).toString("hex");
+const iv = crypto.randomBytes(16);
10
11
const db = [
12
{
@@ -26,7 +26,7 @@ function decrypt(content) {
26
const decipher = crypto.createDecipheriv(
27
algorithm,
28
secret.slice(0, 32),
29
- Buffer.from(iv, "hex")
+ Buffer.from(iv.toString("hex"), "hex")
30
);
31
32
const decrpyted = Buffer.concat([
0 commit comments