I have an existing Cipher, created using
Cipher aesCipher = Cipher.getInstance("AES");
for which I'd like to know what cipher mode and padding scheme was automatically chosen.
aesCipher.getProvider().getInfo()
returns
SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC, ChaCha20)
which is what the current provider supports. However, there seems to be no information available what method is/was being used for encryption.
Maybe this snippet can answer your question:
This is the result: