-
Bug
-
Resolution: Fixed
-
P4
-
unknown
-
mantis
-
sparc
-
solaris_7
Name: krC82822 Date: 02/07/2001
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
Compile and run:
import javax.crypto.Cipher;
import javax.crypto.NullCipher;
public class tjce {
public tjce() {
try {
Cipher cipher = new NullCipher();
cipher.init(Cipher.DECRYPT_MODE, (java.security.Key) null);
} catch (Exception e) {
e.printStackTrace();
return;
}
System.out.println("NullCipher works");
}
public static void main(String args[]) {
tjce t = new tjce();
}
}
Using SunJCE we get:
java.lang.UnsupportedOperationException
at javax.crypto.CipherSpi.engineGetKeySize([DashoPro-V1.2-120198])
at javax.crypto.Cipher.init([DashoPro-V1.2-120198])
at tjce.<init>(tjce.java:9)
at tjce.main(tjce.java:18)
According to the API docs, the provider needs to override engineGetKeySize.
(Review ID: 113143)
======================================================================