miniSecretFromEntropy static method
entropy
should be a byte array from a correctly recovered and checksumed BIP39.
This function accepts slices of different length for different word lengths:
- 16 bytes for 12 words.
- 20 bytes for 15 words.
- 24 bytes for 18 words.
- 28 bytes for 21 words.
- 32 bytes for 24 words.
Any other length will return an error.
password
is analog to BIP39 seed generation itself, with an empty string being defalt.
Implementation
static Future<List<int>> miniSecretFromEntropy(List<int> entropy,
{String password = ''}) async {
final seed = await seedFromEntropy(entropy, password: password);
return seed.sublist(0, 32);
}