public static class DeterministicKeyChain.Builder<T extends DeterministicKeyChain.Builder<T>> extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
bits |
protected byte[] |
entropy |
protected String |
passphrase |
protected SecureRandom |
random |
protected DeterministicSeed |
seed |
protected long |
seedCreationTimeSecs |
protected DeterministicKey |
watchingKey |
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
DeterministicKeyChain |
build() |
T |
entropy(byte[] entropy)
Creates a deterministic key chain starting from the given entropy.
|
protected String |
getPassphrase() |
T |
passphrase(String passphrase)
The passphrase to use with the generated mnemonic, or null if you would like to use the default empty string.
|
T |
random(SecureRandom random)
Generates a new key chain with 128 bits of entropy selected randomly from the given
SecureRandom
object. |
T |
random(SecureRandom random,
int bits)
Generates a new key chain with entropy selected randomly from the given
SecureRandom
object and of the requested size in bits. |
T |
seed(DeterministicSeed seed)
Creates a deterministic key chain starting from the given seed.
|
T |
seedCreationTimeSecs(long seedCreationTimeSecs) |
protected T |
self() |
T |
watchingKey(DeterministicKey watchingKey) |
protected SecureRandom random
protected int bits
protected String passphrase
protected long seedCreationTimeSecs
protected byte[] entropy
protected DeterministicSeed seed
protected DeterministicKey watchingKey
protected T self()
public T entropy(byte[] entropy)
public T seed(DeterministicSeed seed)
public T random(SecureRandom random, int bits)
SecureRandom
object and of the requested size in bits. The derived seed is further protected with a user selected passphrase
(see BIP 39).random
- the random number generator - use new SecureRandom().bits
- The number of bits of entropy to use when generating entropy. Either 128 (default), 192 or 256.public T random(SecureRandom random)
SecureRandom
object. The derived seed is further protected with a user selected passphrase
(see BIP 39).random
- the random number generator - use new SecureRandom().public T watchingKey(DeterministicKey watchingKey)
public T seedCreationTimeSecs(long seedCreationTimeSecs)
public T passphrase(String passphrase)
public DeterministicKeyChain build()
protected String getPassphrase()
Copyright © 2016. All rights reserved.