public void decrypt(KeyParameter aesKey){
  lock.lock();
  try {
    checkState(getEncryptionType() != EncryptionType.UNENCRYPTED,"Wallet is already decrypted");
    checkNotNull(keyCrypter);
    ArrayList<ECKey> decryptedKeyChain=new ArrayList<ECKey>();
    for (    ECKey key : keychain) {
      if (!key.isEncrypted()) {
        decryptedKeyChain.add(key);
      }
 else {
        ECKey decryptedECKey=key.decrypt(keyCrypter,aesKey);
        decryptedKeyChain.add(decryptedECKey);
      }
    }
    keychain=decryptedKeyChain;
    keyCrypter=null;
    extensions.remove(MultiBitWalletProtobufSerializer.ORG_MULTIBIT_WALLET_PROTECT_2);
  }
  finally {
    lock.unlock();
  }
}

public void decrypt ( KeyParameter aesKey ) { lock . lock ( ) ; try { checkState ( getEncryptionType ( ) != EncryptionType . UNENCRYPTED , "Wallet is already decrypted" ) ; checkNotNull ( keyCrypter ) ; ArrayList < ECKey > decryptedKeyChain = new ArrayList < ECKey > ( ) ; for ( ECKey key : keychain ) { if ( ! key . isEncrypted ( ) ) { decryptedKeyChain . add ( key ) ; } else { ECKey decryptedECKey = key . decrypt ( keyCrypter , aesKey ) ; decryptedKeyChain . add ( decryptedECKey ) ; } } keychain = decryptedKeyChain ; keyCrypter = null ; extensions . remove ( MultiBitWalletProtobufSerializer . ORG_MULTIBIT_WALLET_PROTECT_2 ) ; } finally { lock . unlock ( ) ; } }
decrypt the wallet with the wallets keycrypter and aes key .
