Skip to content
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

エントロピー #1

Open
you21979 opened this issue May 22, 2017 · 1 comment
Open

エントロピー #1

you21979 opened this issue May 22, 2017 · 1 comment

Comments

@you21979
Copy link
Owner

bip32 master seed buffer ->64byte
ripple encode -> 16byte

@you21979
Copy link
Owner Author

function generateSeed() {
  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];

  assert(!options.entropy || options.entropy.length >= 16, 'entropy too short');
  var entropy = options.entropy ? options.entropy.slice(0, 16) : brorand(16);
  var type = options.algorithm === 'ed25519' ? 'ed25519' : 'secp256k1';
  return addressCodec.encodeSeed(entropy, type);
}

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

No branches or pull requests

1 participant