@Test public void testGenerateWalletFileFreshEcKeyPair() throws Exception { String pw = "password"; String fileName = WalletUtils.generateWalletFile(pw, this.tempDir); Path p = Paths.get(this.tempDir.getPath(), fileName); Wallet loadedWallet = Wallet.fromNEP6Wallet(p.toFile()); loadedWallet.decryptAllAccounts(pw); assertTrue(AddressUtils.isValidAddress(loadedWallet.getAccounts().get(0).getAddress())); assertThat(loadedWallet.getAccounts().get(0).getECKeyPair(), notNullValue()); }
public static String generateWalletFile( String password, File destinationDirectory) throws CipherException, IOException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException { ECKeyPair ecKeyPair = ECKeyPair.createEcKeyPair(); return generateWalletFile(password, ecKeyPair, destinationDirectory); }
WalletUtils { public static String generateWalletFile( String password, File destinationDirectory) throws CipherException, IOException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException { ECKeyPair ecKeyPair = ECKeyPair.createEcKeyPair(); return generateWalletFile(password, ecKeyPair, destinationDirectory); } }
WalletUtils { public static String generateWalletFile( String password, File destinationDirectory) throws CipherException, IOException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException { ECKeyPair ecKeyPair = ECKeyPair.createEcKeyPair(); return generateWalletFile(password, ecKeyPair, destinationDirectory); }  }
WalletUtils { public static String generateWalletFile( String password, File destinationDirectory) throws CipherException, IOException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException { ECKeyPair ecKeyPair = ECKeyPair.createEcKeyPair(); return generateWalletFile(password, ecKeyPair, destinationDirectory); }  static String generateWalletFile(
            String password, File destinationDirectory); static String generateWalletFile(
            String password, ECKeyPair ecKeyPair, File destinationDirectory); static String generateWalletFile(NEP6Wallet nep6Wallet, File destinationDirectory); static String getWalletFileName(NEP6Wallet nep6Wallet); static String getDefaultKeyDirectory(); }
WalletUtils { public static String generateWalletFile( String password, File destinationDirectory) throws CipherException, IOException, InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException { ECKeyPair ecKeyPair = ECKeyPair.createEcKeyPair(); return generateWalletFile(password, ecKeyPair, destinationDirectory); }  static String generateWalletFile(
            String password, File destinationDirectory); static String generateWalletFile(
            String password, ECKeyPair ecKeyPair, File destinationDirectory); static String generateWalletFile(NEP6Wallet nep6Wallet, File destinationDirectory); static String getWalletFileName(NEP6Wallet nep6Wallet); static String getDefaultKeyDirectory();  }