public class Wallet
extends java.lang.Object
Ethereum wallet file management. For reference, refer to Web3 Secret Storage Definition or the Go Ethereum client implementation.
Note: the Bouncy Castle Scrypt implementation
SCrypt, fails to comply with the following
Ethereum reference
Scrypt test vector:
// Only value of r that cost (as an int) could be exceeded for is 1
if (r == 1 && N_STANDARD > 65536)
{
throw new IllegalArgumentException("Cost parameter N_STANDARD must be > 1 and < 65536.");
}
| Constructor and Description |
|---|
Wallet() |
| Modifier and Type | Method and Description |
|---|---|
static WalletFile |
create(java.lang.String password,
ECKeyPair ecKeyPair,
int n,
int p) |
static WalletFile |
createLight(java.lang.String password,
ECKeyPair ecKeyPair) |
static WalletFile |
createStandard(java.lang.String password,
ECKeyPair ecKeyPair) |
static ECKeyPair |
decrypt(java.lang.String password,
WalletFile walletFile) |
public static WalletFile create(java.lang.String password, ECKeyPair ecKeyPair, int n, int p) throws CipherException
CipherExceptionpublic static WalletFile createStandard(java.lang.String password, ECKeyPair ecKeyPair) throws CipherException
CipherExceptionpublic static WalletFile createLight(java.lang.String password, ECKeyPair ecKeyPair) throws CipherException
CipherExceptionpublic static ECKeyPair decrypt(java.lang.String password, WalletFile walletFile) throws CipherException
CipherException