From 50df402340ea77e7da8f11dd516d7d4d703d8d9e Mon Sep 17 00:00:00 2001
From: librelois <c@elo.tf>
Date: Thu, 1 Oct 2020 19:27:53 +0200
Subject: [PATCH] [fix] custom scrypt parameters not applied

---
 app/modules/keypair/index.ts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/modules/keypair/index.ts b/app/modules/keypair/index.ts
index 73d2b33df..e3d971d00 100644
--- a/app/modules/keypair/index.ts
+++ b/app/modules/keypair/index.ts
@@ -202,6 +202,12 @@ async function promptKey(conf: KeypairConfDTO, program: any) {
       obfuscatedPasswd.length > 0 && obfuscatedPasswd == answersPasswd.passwd;
     const salt = keepOldSalt ? program.salt : answersSalt.salt;
     const passwd = keepOldPasswd ? program.passwd : answersPasswd.passwd;
-    conf.pair = await Scrypt(salt, passwd);
+    conf.pair = await Scrypt(
+      salt,
+      passwd,
+      program.keyN || 4096,
+      program.keyr || 16,
+      program.keyp || 1
+    );
   }
 }
-- 
GitLab