1

With reference to my earlier question Why does Java class library still use String constants in place of enum, can someone recommend an online information source to look for what all String constants are permitted for a Java Standard Class library method accepting a String constant? For example, what String values can MessageDigest.getInstance can take, other than "SHA" ? Similarly, what all properties can be fed into a Properties instance to create a valid SMTP/IMAP Session? Some of them are

properties.setProperty("mail.imap.auth", "true");
properties.setProperty("mail.imap.host", mailHost);
properties.setProperty("mail.imap.port", mailServerPort.toString());
properties.setProperty("mail.imap.starttls.enable","true");
properties.setProperty("mail.imap.starttls.enable","true");
properties.setProperty("mail.imap.ssl.enable","true");

Now create your Session as

Session.getInstance(properties, authenticator);
Community
  • 1
  • 1
Rajan Prasad
  • 1,582
  • 1
  • 16
  • 33

1 Answers1

1

There's no one place, especially as you have mentioned a JDK class and an extension class. You just have to look around the Javadoc.

For example, what String values can MessageDigest.getInstance can take, other than "SHA"

Appendix A of the JCE Specification.

Similarly, what all properties can be fed into a Properties instance to create a valid SMTP/IMAP Session?

Package documentation for the JavaMail SMTP and IMAP packages respectively.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • I understand. But unfortunately, I dont remember seeing a reference to JCE specification in the oracle docs for MessageDigest. So, it is a pain to understand where to even start looking for. – Rajan Prasad Aug 04 '14 at 05:18
  • [Look again:](http://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html) "These algorithms are described in the MessageDigest section of the Java Cryptography Architecture Standard Algorithm Name Documentation. Consult the release documentation for your implementation to see if any other algorithms are supported." – user207421 Aug 04 '14 at 05:53