Java: Any idea why MessageDigest.getInstance("MD5") would return null? This was working just fine until recently.
Java: Any idea why MessageDigest.getInstance(MD5) would return null ? This was working just fine
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I doubt about the question
If the class
MessageDigestyou meant isjava.security.MessageDigest, that method will NOT return null, even if you gave a not existing algorithm as parameter.The code from jdk1.7
if it returned null, then md or delegate must be null, then NPE happened in this class.
so check and debug your codes step by step, find out which object is null.