Fixing bug in the encryption step of the wallet backup

This commit is contained in:
Nelson R. Perez 2017-03-01 21:06:24 -05:00
parent 60dabfef31
commit b51f21bbc5

View file

@ -51,7 +51,7 @@ public class Wallet {
byte[] decryptedKey = new byte[Util.KEY_LENGTH]; byte[] decryptedKey = new byte[Util.KEY_LENGTH];
secureRandom.nextBytes(decryptedKey); secureRandom.nextBytes(decryptedKey);
this.encryption_key = Util.bytesToHex(Util.encryptAES(decryptedKey, password.getBytes())); 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.brainkey_sequence = brainkeySequence;
this.chain_id = chainId; this.chain_id = chainId;