Package foundation.icon.icx.crypto
Class Keystore
- java.lang.Object
-
- foundation.icon.icx.crypto.Keystore
-
public class Keystore extends java.lang.Object
Original Code https://github.com/web3j/web3j/blob/master/crypto/src/main/java/org/web3j/crypto/Wallet.javaEthereum 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
Constructors Constructor Description Keystore()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeystoreFile
create(java.lang.String password, Bytes privateKey, int n, int p)
static Bytes
decrypt(java.lang.String password, KeystoreFile keystoreFile)
-
-
-
Method Detail
-
create
public static KeystoreFile create(java.lang.String password, Bytes privateKey, int n, int p) throws KeystoreException
- Throws:
KeystoreException
-
decrypt
public static Bytes decrypt(java.lang.String password, KeystoreFile keystoreFile) throws KeystoreException
- Throws:
KeystoreException
-
-