Fixing bug in the encryption step of the wallet backup

master
Nelson R. Perez 2017-03-01 21:06:24 -05:00
parent 60dabfef31
commit b51f21bbc5
1 changed files with 1 additions and 1 deletions

View File

@ -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;