code: public ECKey encrypt(KeyCrypter keyCrypter, KeyParameter aesKey) throws KeyCrypterException {
          checkNotNull(keyCrypter);
          final byte[] privKeyBytes = getPrivKeyBytes();
          EncryptedData encryptedPrivateKey = keyCrypter.encrypt(privKeyBytes, aesKey);
          ECKey result = ECKey.fromEncrypted(encryptedPrivateKey, keyCrypter, getPubKey());
          result.setCreationTimeSeconds(creationTimeSeconds);
          return result;
      }
docs: Create an encrypted private key with the keyCrypter and the AES key supplied.
  This method returns a new encrypted key and leaves the original unchanged.
  
  @param keyCrypter The keyCrypter that specifies exactly how the encrypted bytes are created.
  @param aesKey The KeyParameter with the AES encryption key (usually constructed with keyCrypter#deriveKey and cached as it is slow to create).
  @return encryptedKey