-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mnemonicToSeed should throw on non-string input #77
Comments
IMO NACK... this is not something the library should be throwing on. The application should decide whether to throw or not on zero length / multiple whitespace etc. |
@junderw then let us provide an "unsafe" option.
The advanced user needs protection too. |
concept ACK - it's so easy for whitespace to be introduced, and then the mnemonic input is directly hashed.. It can be pretty easy to miss the typo 'abandon abandon abandon' and 'abandon abandon abandon' when it's a large block. The whitespace isn't covered by the checksum, and if we allow users to make this mistake, we can expect people to panic when the recover from a seed that was transcribed to paper.. Empty string is forbidden by BIP39 - the 'recommended sizes' are the only acceptable ones it turns out, so a zero length mnemonic is invalid :) |
AFAIK, |
It should probably additionally throw on empty string? But maybe someone has a use case there...
Additionally:
The text was updated successfully, but these errors were encountered: