According to <http://java.sun.com/developer/technicalArticles/Security/
AES/AES_v1.html>, you can encrypt stuff with AES using
javax.crypto.Cipher (among other objects). I downloaded the Java
sources at <http://download.java.net/jdk6/> and did not find any
crypto.* classes in the directory I would have expected to - the j2se
\src\share\classes\javax . Every other class I can think of is
implemented in j2se\src\share\classes\*, so why not crypto?
Never-the-less, I did find a copy of it at <http://
developer.classpath.org/doc/javax/crypto/Cipher-source.html>.
Unfortunately, it still leaves me guessing as to where Java's
implementation of AES actually is. Any ideas?
rossum - 25 Apr 2007 20:09 GMT
>According to <http://java.sun.com/developer/technicalArticles/Security/
>AES/AES_v1.html>, you can encrypt stuff with AES using
[quoted text clipped - 8 lines]
>Unfortunately, it still leaves me guessing as to where Java's
>implementation of AES actually is. Any ideas?
It is in javax.crypto.Cipher as you suspected. There is no explicit
AES class, it is one of the possible cyphers that Cipher can use. You
specify it in the transformation string: cypher/mode/padding.
Cipher myAESCypher = Cipher.getInstance("AES/CBC/PKCS5Padding");
Your implementation will throw an error if it does not have AES
available.
rossum