generateMnemonic function

String generateMnemonic({
  1. int strength = 256,
  2. RandomBytes randomBytes = _randomBytes,
})

Implementation

String generateMnemonic(
    {int strength = 256, RandomBytes randomBytes = _randomBytes}) {
  assert(strength % 32 == 0);
  final entropy = randomBytes(strength ~/ 8);
  return entropyToMnemonic(HEX.encode(entropy));
}