The javax.crypto package, as Bob pointed out, would be your best bet as it is part of the Java API. With that said, I know that the implementation that comes with the JDK (at least for certain algorithms and in the old version of the JDK) was rather slow.
If you are looking for alternative implementations (which still comply with the javax.crypto specification), take a look at Bouncy Castle:
http://www.bouncycastle.org/
source share