generateMnemonic function

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

Implementation

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