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,
org.web3j.crypto.ECKeyPair ecKeyPair,
int n,
int p) |
static WalletFile |
createLight(java.lang.String password,
org.web3j.crypto.ECKeyPair ecKeyPair) |
static WalletFile |
createStandard(java.lang.String password,
org.web3j.crypto.ECKeyPair ecKeyPair) |
static org.web3j.crypto.ECKeyPair |
decrypt(java.lang.String password,
WalletFile walletFile) |
public static WalletFile create(java.lang.String password, org.web3j.crypto.ECKeyPair ecKeyPair, int n, int p) throws org.web3j.crypto.CipherException
org.web3j.crypto.CipherException
public static WalletFile createStandard(java.lang.String password, org.web3j.crypto.ECKeyPair ecKeyPair) throws org.web3j.crypto.CipherException
org.web3j.crypto.CipherException
public static WalletFile createLight(java.lang.String password, org.web3j.crypto.ECKeyPair ecKeyPair) throws org.web3j.crypto.CipherException
org.web3j.crypto.CipherException
public static org.web3j.crypto.ECKeyPair decrypt(java.lang.String password, WalletFile walletFile) throws org.web3j.crypto.CipherException
org.web3j.crypto.CipherException