Package org.web3j.crypto
Class Wallet
java.lang.Object
org.web3j.crypto.Wallet
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic WalletFile
static WalletFile
createLight
(String password, org.web3j.crypto.ECKeyPair ecKeyPair) static WalletFile
createStandard
(String password, org.web3j.crypto.ECKeyPair ecKeyPair) static org.web3j.crypto.ECKeyPair
decrypt
(String password, WalletFile walletFile)
-
Constructor Details
-
Wallet
public Wallet()
-
-
Method Details
-
create
public static WalletFile create(String password, org.web3j.crypto.ECKeyPair ecKeyPair, int n, int p) throws org.web3j.crypto.exception.CipherException - Throws:
org.web3j.crypto.exception.CipherException
-
createStandard
public static WalletFile createStandard(String password, org.web3j.crypto.ECKeyPair ecKeyPair) throws org.web3j.crypto.exception.CipherException - Throws:
org.web3j.crypto.exception.CipherException
-
createLight
public static WalletFile createLight(String password, org.web3j.crypto.ECKeyPair ecKeyPair) throws org.web3j.crypto.exception.CipherException - Throws:
org.web3j.crypto.exception.CipherException
-
decrypt
public static org.web3j.crypto.ECKeyPair decrypt(String password, WalletFile walletFile) throws org.web3j.crypto.exception.CipherException - Throws:
org.web3j.crypto.exception.CipherException
-