Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

parseEncryptedPassphrase and decryptPassphraseWithPassword combination should return proper error #688

Closed
nazarhussain opened this issue Jun 11, 2018 · 3 comments

Comments

@nazarhussain
Copy link

nazarhussain commented Jun 11, 2018

Description

lisk.default.cryptography.parseEncryptedPassphrase when used in combination of lisk.default.cryptography.decryptPassphraseWithPassword is not returning valid error in case of no salt provided

Steps to Reproduce

const encryptedPassphrase = 'iterations=1&cipherText=73f5827fcd8eeab475abff71476cbce3b1ecacdeac55a738bb2f0a676d8e543bb92c91e1c1e3ddb6cef07a503f034dc7718e39657218d5a955859c5524be06de5954a5875b4c7b1cd11835e3477f1d04&iv=aac6a3b77c0594552bd9c932&tag=86231fb20e7b263264ca68b3585967ca&version=1'
try {
   lisk.default.cryptography.decryptPassphraseWithPassword(
       lisk.default.cryptography.parseEncryptedPassphrase(encryptedPassphrase));
} catch(error) {
   console.log(error)
}

Expected behavior:
I expect error No salt provided

Actual behavior:
I expect error Argument must be a string. This makes it confusing for user to understand the error, which element is missing or not provided in encrypted passphrase.

Reproduces how often:
Always

Versions

1.0.0-beta.4

@nazarhussain nazarhussain changed the title parseEncryptedPassphrase should return proper error parseEncryptedPassphrase and decryptPassphraseWithPassword combination should return proper error Jun 11, 2018
@willclarktech
Copy link
Contributor

@nazarhussain How did you generate this string?

@nazarhussain
Copy link
Author

From some tests in the core. 😄

@willclarktech
Copy link
Contributor

Closed by #709

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants