code: public static boolean encryptionIsReversible(ECKey originalKey, ECKey encryptedKey, KeyCrypter keyCrypter, KeyParameter aesKey) {
          try {
              ECKey rebornUnencryptedKey = encryptedKey.decrypt(keyCrypter, aesKey);
              byte[] originalPrivateKeyBytes = originalKey.getPrivKeyBytes();
              byte[] rebornKeyBytes = rebornUnencryptedKey.getPrivKeyBytes();
              if (!Arrays.equals(originalPrivateKeyBytes, rebornKeyBytes)) {
                  log.error("The check that encryption could be reversed failed for {}", originalKey);
                  return false;
              }
              return true;
          } catch (KeyCrypterException kce) {
              log.error(kce.getMessage());
              return false;
          }
      }
docs: <p>Check that it is possible to decrypt the key with the keyCrypter and that the original key is returned.</p>
  
  <p>Because it is a critical failure if the private keys cannot be decrypted successfully (resulting of loss of all
  bitcoins controlled by the private key) you can use this method to check when you *encrypt* a wallet that
  it can definitely be decrypted successfully.</p>
  
  <p>See {@link Wallet#encrypt(KeyCrypter keyCrypter, KeyParameter aesKey)} for example usage.</p>
  
  @return true if the encrypted key can be decrypted back to the original key successfully.