@Test public void testEncryptPrivateKey() throws CipherException { String privKeyString = "7fe9d4b69f85c1fe15387a76e79d2b95c4c9e3fe756de3435afbc077d99d5346"; ECKeyPair keyPair = ECKeyPair.create(Numeric.hexStringToByteArray(privKeyString)); String password = "neo"; String expectedNep2Encrypted = "6PYLykbKcbwnCuTJiQQ5PYu5uH9NgwGYLoMyTUabRxRJUsiA9GP8NgorUV"; Account a = new Account(keyPair); a.encryptPrivateKey(password); assertThat(a.getEncryptedPrivateKey(), is(expectedNep2Encrypted)); }
public void encryptPrivateKey(String password) throws CipherException { encryptPrivateKey(password, NEP2.DEFAULT_SCRYPT_PARAMS); }
Account { public void encryptPrivateKey(String password) throws CipherException { encryptPrivateKey(password, NEP2.DEFAULT_SCRYPT_PARAMS); } }
Account { public void encryptPrivateKey(String password) throws CipherException { encryptPrivateKey(password, NEP2.DEFAULT_SCRYPT_PARAMS); } protected  Account();  Account(ECKeyPair ecKeyPair); }
Account { public void encryptPrivateKey(String password) throws CipherException { encryptPrivateKey(password, NEP2.DEFAULT_SCRYPT_PARAMS); } protected  Account();  Account(ECKeyPair ecKeyPair); String getAddress(); ScriptHash getScriptHash(); ECKeyPair getECKeyPair(); String getLabel(); Account label(String label); Wallet getWallet(); Boolean isDefault(); Boolean isLocked(); Account lock(); void unlock(); VerificationScript getVerificationScript(); String getEncryptedPrivateKey(); void decryptPrivateKey(String password); void decryptPrivateKey(String password, ScryptParams scryptParams); void encryptPrivateKey(String password); void encryptPrivateKey(String password, ScryptParams scryptParams); boolean isMultiSig(); Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j); NEP6Account toNEP6Account(); static Account createMultiSigAccount(List<ECPublicKey> publicKeys, int signatureThreshold); static Account fromWIF(String wif); static Account fromNewECKeyPair(); static Account fromNEP6Account(NEP6Account nep6Acct); static Account fromAddress(String address); static Account createAccount(); }
Account { public void encryptPrivateKey(String password) throws CipherException { encryptPrivateKey(password, NEP2.DEFAULT_SCRYPT_PARAMS); } protected  Account();  Account(ECKeyPair ecKeyPair); String getAddress(); ScriptHash getScriptHash(); ECKeyPair getECKeyPair(); String getLabel(); Account label(String label); Wallet getWallet(); Boolean isDefault(); Boolean isLocked(); Account lock(); void unlock(); VerificationScript getVerificationScript(); String getEncryptedPrivateKey(); void decryptPrivateKey(String password); void decryptPrivateKey(String password, ScryptParams scryptParams); void encryptPrivateKey(String password); void encryptPrivateKey(String password, ScryptParams scryptParams); boolean isMultiSig(); Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j); NEP6Account toNEP6Account(); static Account createMultiSigAccount(List<ECPublicKey> publicKeys, int signatureThreshold); static Account fromWIF(String wif); static Account fromNewECKeyPair(); static Account fromNEP6Account(NEP6Account nep6Acct); static Account fromAddress(String address); static Account createAccount();  }