HDNode: enforces sane seed lengths

This avoids the problem where a user may accidentally give an invalid seed `Buffer` which could be catastrophically interpreted as a seed of `0`. 
Ha.  I feel like they are, but it appears you are correct.  Will fix.
On Jul 11, 2014 6:10 PM, "Wei Lu" <notifications@github.com> wrote:

> In src/hdnode.js:
>
> > @@ -51,6 +51,10 @@ HDNode.HIGHEST_BIT = 0x80000000
> >  HDNode.LENGTH = 78
> >
> >  HDNode.fromSeedBuffer = function(seed, network) {
> > +  assert(Buffer.isBuffer(seed), 'Expected Buffer, got' + seed)
> > +  assert(seed.length >= 16, 'Seed should be atleast 128 bits')
> > +  assert(seed.length <= 64, 'Seed should be atmost 512 bits')
>
> @dcousens <https://github.com/dcousens> Since when are "atmost" and
> "atleast" actual words? ;)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/bitcoinjs/bitcoinjs-lib/pull/242/files#r14810498>.
>