From b51f21bbc5bac8731b3deac5b0de3845ed461fb8 Mon Sep 17 00:00:00 2001 From: "Nelson R. Perez" Date: Wed, 1 Mar 2017 21:06:24 -0500 Subject: [PATCH] Fixing bug in the encryption step of the wallet backup --- .../java/de/bitsharesmunich/graphenej/models/backup/Wallet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphenej/src/main/java/de/bitsharesmunich/graphenej/models/backup/Wallet.java b/graphenej/src/main/java/de/bitsharesmunich/graphenej/models/backup/Wallet.java index 528af52..b522a4e 100644 --- a/graphenej/src/main/java/de/bitsharesmunich/graphenej/models/backup/Wallet.java +++ b/graphenej/src/main/java/de/bitsharesmunich/graphenej/models/backup/Wallet.java @@ -51,7 +51,7 @@ public class Wallet { byte[] decryptedKey = new byte[Util.KEY_LENGTH]; secureRandom.nextBytes(decryptedKey); this.encryption_key = Util.bytesToHex(Util.encryptAES(decryptedKey, password.getBytes())); - this.encrypted_brainkey = Util.bytesToHex(Util.encryptAES(decryptedKey, brainKey.getBytes())); + this.encrypted_brainkey = Util.bytesToHex(Util.encryptAES(brainKey.getBytes(), decryptedKey)); this.brainkey_sequence = brainkeySequence; this.chain_id = chainId;