generateFromEntropy method

List<int> generateFromEntropy([
  1. String passphrase = ""
])

Generates a seed from the Bip39 mnemonic entropy.

Optionally, a passphrase can be provided to further secure the seed generation.

Example usage:

final seedGenerator = Bip39SeedGenerator(mnemonic);
final seed = seedGenerator.generateFromEntropy("my_passphrase");

Implementation

List<int> generateFromEntropy([String passphrase = ""]) {
  final salt = Bip39SeedGeneratorConst.seedSaltMod + passphrase;
  return QuickCrypto.pbkdf2DeriveKey(
    password: _entropy,
    salt: StringUtils.encode(salt),
    iterations: Bip39SeedGeneratorConst.seedPbkdf2Rounds,
  );
}