This repository was archived by the owner on Oct 30, 2024. It is now read-only.
Conversation
e2dcf5e to
1ed1f2f
Compare
Member
|
Rebased this. |
holgerd77
approved these changes
Sep 24, 2018
| it('should fail with invalid password', function () { | ||
| var w = '{"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"6087dab2f9fdbbfaddc31a909735c1e6"},"ciphertext":"5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46","kdf":"pbkdf2","kdfparams":{"c":262144,"dklen":32,"prf":"hmac-sha256","salt":"ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd"},"mac":"517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2"},"id":"3198bc9c-6672-5ab3-d995-4942343ae5b6","version":3}' | ||
| assert.throws(function () { | ||
| Wallet.fromV3(w, 'wrongtestpassword') |
Member
There was a problem hiding this comment.
This is just changing the password to an invalid one, unproblematic, looks good.
| }) | ||
| it('should fail for wrong kdf', function () { | ||
| var w = '{"Crypto":{"kdf":"superkey"},"version":3}' | ||
| var w = '{"crypto":{"kdf":"superkey"},"version":3}' |
Member
There was a problem hiding this comment.
Going to strict here, looks good.
| var w = '{"crypto":{"kdf":"pbkdf2","kdfparams":{"prf":"invalid"}},"version":3}' | ||
| assert.throws(function () { | ||
| Wallet.fromV3(w, 'testpassword') | ||
| }, /^Error: Unsupported parameters to PBKDF2$/) |
Member
There was a problem hiding this comment.
New test case with unsupported parameters, looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.