/** * Wallet Constructor(generate key file). * * @param key ECKey * @param keyPath keyPath(directory) * @param keyName keyName * @param password password * @throws IOException IOException * @throws InvalidCipherTextException InvalidCipherTextException */ public Wallet(ECKey key, String keyPath, String keyName, String password) throws IOException, InvalidCipherTextException { if (!Password.passwordValid(password)) { logger.error("Invalid Password"); throw new IOException("Invalid Password"); } encryptKeyFileInit(key, keyPath, keyName, password); }
encryptKeyFileInit(key, keyPath, keyName, keyPassword); } catch (IOException ioe) { logger.error("Cannot generate the Key file at " + keyPath + keyName);