Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SecretKeyFactory Missing (Linux / java full version "1.6.0-b105")

843811Aug 8 2007 — edited Aug 9 2007
From this installer:

java_app_platform_sdk-5_02-linux.bin

...which I downloaded on 8 August, 2007 (Australia CST), this program:

// BEGIN PROGRAM

package aessecretkey;

import java.security.NoSuchAlgorithmException;
import javax.crypto.SecretKeyFactory;

/**
*
* @author lloy0076
*/
public class Main {

/** Creates a new instance of Main */
public Main() {
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
try {
SecretKeyFactory.getInstance("AES");
} catch (NoSuchAlgorithmException ex) {
ex.printStackTrace();
return;
}
System.out.println("Pass - no exceptions thrown!");
}

}

//END PROGRAM

...throws this error on my GNU/Linux:

[lloy0076@linux dist]$ java -jar AesSecretKey.jar
java.security.NoSuchAlgorithmException: AES SecretKeyFactory not available
at javax.crypto.SecretKeyFactory.<init>(DashoA13*..)
at javax.crypto.SecretKeyFactory.getInstance(DashoA13*..)
at aessecretkey.Main.main(Main.java:30)

According to:

http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html

...in the intersts of Interoperability, that should return an actual instance (and not a "not found/not available").

I realise that it is only RECOMMENDED, however I'm not sure whether this should be reported as a bug...

DSL
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2007
Added on Aug 8 2007
3 comments
346 views