store passphrase in memory as securestring

This commit is contained in:
Craig Raw 2020-08-06 10:27:03 +02:00
parent 2a6a296cf3
commit 32d25286a6

View file

@ -218,7 +218,7 @@ public class Electrum implements KeystoreFileImport, WalletImport, WalletExport
ek.pw_hash_version = 1; ek.pw_hash_version = 1;
if(keystore.getSeed().getType() == DeterministicSeed.Type.ELECTRUM) { if(keystore.getSeed().getType() == DeterministicSeed.Type.ELECTRUM) {
ek.seed = keystore.getSeed().getMnemonicString().asString(); ek.seed = keystore.getSeed().getMnemonicString().asString();
ek.passphrase = keystore.getSeed().getPassphrase(); ek.passphrase = keystore.getSeed().getPassphrase() == null ? null : keystore.getSeed().getPassphrase().asString();
} else if(keystore.getSeed().getType() == DeterministicSeed.Type.BIP39) { } else if(keystore.getSeed().getType() == DeterministicSeed.Type.BIP39) {
ew.seed_type = "bip39"; ew.seed_type = "bip39";
} }