Improved encryption implementation

This commit is contained in:
Kgothatso
2019-11-26 22:42:26 +02:00
parent de7bd68872
commit 0a17e78fdc
3 changed files with 36 additions and 7 deletions

View File

@@ -58,8 +58,9 @@ module.exports.handler = (argv) => {
if(lock) {
// Sign the message with the key that corresponds with this lock...
const encryptedKey = lock.extendedPublicKey.key.encryptedPrivateKey;
const iv = lock.extendedPublicKey.key.iv;
const password = "vanished";
const walletXpriv = cryptoUtil.decrypt(encryptedKey, password);
const walletXpriv = cryptoUtil.decrypt(encryptedKey, password, iv);
var challengeDerivationPath = `${lock.extendedPublicKey.derivationPath}/${challenge.derivationPath.split("c/")[1]}`;