diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/com/google/bitcoin/core/Wallet.java index fef6bc7f..eac13a91 100644 --- a/core/src/main/java/com/google/bitcoin/core/Wallet.java +++ b/core/src/main/java/com/google/bitcoin/core/Wallet.java @@ -2163,6 +2163,9 @@ public class Wallet implements Serializable, BlockChainListener { builder.append(String.format(" %d dead transactions%n", dead.size())); builder.append(String.format("Last seen best block: (%d) %s%n", getLastBlockSeenHeight(), getLastBlockSeenHash())); + if (this.keyCrypter != null) { + builder.append(String.format("Encryption: %s%n", keyCrypter.toString())); + } // Do the keys. builder.append("\nKeys:\n"); for (ECKey key : keychain) { @@ -2193,10 +2196,6 @@ public class Wallet implements Serializable, BlockChainListener { builder.append("\nDEAD:\n"); toStringHelper(builder, dead, chain); } - // Add the keyCrypter so that any setup parameters are in the wallet toString. - if (this.keyCrypter != null) { - builder.append("\nkeyCrypter: " + keyCrypter.toString()); - } return builder.toString(); } finally { lock.unlock(); diff --git a/core/src/main/java/com/google/bitcoin/crypto/KeyCrypterScrypt.java b/core/src/main/java/com/google/bitcoin/crypto/KeyCrypterScrypt.java index 19f36018..ed581a8e 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/KeyCrypterScrypt.java +++ b/core/src/main/java/com/google/bitcoin/crypto/KeyCrypterScrypt.java @@ -139,11 +139,6 @@ public class KeyCrypterScrypt implements KeyCrypter, Serializable { /** * Password based encryption using AES - CBC 256 bits. - * - * @param plain The bytes to encrypt - * @param aesKey The AES key to use for encryption - * @return EncryptedPrivateKey containing IV and the encrypted private key - * @throws KeyCrypterException */ @Override public EncryptedPrivateKey encrypt(byte[] plainBytes, KeyParameter aesKey) throws KeyCrypterException { @@ -239,7 +234,7 @@ public class KeyCrypterScrypt implements KeyCrypter, Serializable { @Override public String toString() { - return "EncrypterDecrypterScrypt [scryptParameters=" + scryptParameters.toString() + "]"; + return "Scrypt/AES"; } @Override