public final class SeedCalculator
extends java.lang.Object
| Constructor and Description |
|---|
SeedCalculator()
Creates a seed calculator using
SpongyCastlePBKDF2WithHmacSHA512 which is the most compatible. |
SeedCalculator(PBKDF2WithHmacSHA512 hashAlgorithm) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
calculateSeed(java.lang.String mnemonic,
java.lang.String passphrase)
Calculate the seed given a mnemonic and corresponding passphrase.
|
SeedCalculatorByWordListLookUp |
withWordsFromWordList(WordList wordList) |
public SeedCalculator(PBKDF2WithHmacSHA512 hashAlgorithm)
public SeedCalculator()
SpongyCastlePBKDF2WithHmacSHA512 which is the most compatible.
Use SeedCalculator(PBKDF2WithHmacSHA512) to supply another.public byte[] calculateSeed(java.lang.String mnemonic,
java.lang.String passphrase)
MnemonicValidator.
Due to normalization, these need to be String, and not CharSequence, this is an open issue:
https://github.com/NovaCrypto/BIP39/issues/7
If you have a list of words selected from a word list, you can use withWordsFromWordList(io.github.novacrypto.bip39.WordList) then
SeedCalculatorByWordListLookUp.calculateSeed(java.util.Collection<? extends java.lang.CharSequence>, java.lang.String)
mnemonic - The memorable list of wordspassphrase - An optional passphrase, use "" if not requiredpublic SeedCalculatorByWordListLookUp withWordsFromWordList(WordList wordList)