Skip to content

Instantly share code, notes, and snippets.

@siddharthgoel88
Created August 22, 2019 05:32
Show Gist options
  • Save siddharthgoel88/4278fc080efb164353a240a02ad81266 to your computer and use it in GitHub Desktop.
Save siddharthgoel88/4278fc080efb164353a240a02ad81266 to your computer and use it in GitHub Desktop.
Test if a specific Cipher works on your JDK or not
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
public class CipherTesting {
public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingException {
System.out.println(Cipher.getInstance("AES/CBC/PKCS5Padding")); //Or whichever Cipher suite is missing.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment