Commit Graph

5 Commits

Author SHA1 Message Date
Michael Bradley, Jr 675d4c300b format-fix 2020-01-14 18:06:39 -06:00
Michael Bradley, Jr debbd4f4b1 Normalize salt, iv, uuid params of .toV3() before encrypting
Previously, if `salt`, `iv` and/or `uuid` options were supplied as strings to
`.toV3()` they would be passed to `pbkdf2Sync`/`scrypt` as strings. That could
result in errors during encryption. Also, during decryption these options were
always converted to Buffer instances such that supplying strings during
encryption could result in output that could not be decrypted.

This commit fixes the inconsistencies, guards against bad inputs, and also
makes encrypted output match up with the output of other wallet libraries, e.g.
`ethers`, whenever the equivalent encryption options are used consistently
across libraries.
2019-08-26 14:14:21 -05:00
Jack Cook 288442924e PR review fixes 2019-07-02 11:56:56 -07:00
Jack Cook 733e49b7e9 use module style exports to maintain the way JS imports the compiled code 2019-06-28 15:17:29 -07:00
Jack Cook 695da18e44 converted files to ts, fixed tests, implemented ethereumjs standards for coverage, ts compiler, and tslint 2019-06-27 19:10:15 -07:00