Java 类javax.crypto.ExemptionMechanismSpi 实例源码
项目:In-the-Box-Fork
文件:ExemptionMechanismTest.java
@TestTargets({
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "getOutputSize",
args = {int.class}
),
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
clazz = ExemptionMechanismSpi.class,
method = "engineGetOutputSize",
args = {int.class}
)
})
public void test_getOutputSizeI() throws Exception {
Provider mProv = (new SpiEngUtils()).new MyProvider("MyExMechProvider",
"Provider for ExemptionMechanism testing",
srvExemptionMechanism.concat(".").concat(defaultAlg),
ExemptionMechanismProviderClass);
ExemptionMechanism em = new ExemptionMechanism(
new MyExemptionMechanismSpi(), mProv, defaultAlg) {
};
Key key = new MyExemptionMechanismSpi().new tmpKey("Proba", new byte[0]);
try {
em.getOutputSize(10);
fail("IllegalStateException expected");
} catch (IllegalStateException e) {
//failed
}
em.init(key);
assertEquals(10, em.getOutputSize(10));
}
项目:In-the-Box-Fork
文件:ExemptionMechanismTest.java
protected Mock_ExemptionMechanism(ExemptionMechanismSpi exmechSpi, Provider provider, String mechanism) {
super(exmechSpi, provider, mechanism);
}
项目:cn1
文件:ExemptionMechanism_ImplTest.java
public myEM(ExemptionMechanismSpi spi, Provider prov, String mechanism) {
super(spi, prov, mechanism);
}
项目:freeVM
文件:ExemptionMechanism_ImplTest.java
public myEM(ExemptionMechanismSpi spi, Provider prov, String mechanism) {
super(spi, prov, mechanism);
}
项目:freeVM
文件:ExemptionMechanism_ImplTest.java
public myEM(ExemptionMechanismSpi spi, Provider prov, String mechanism) {
super(spi, prov, mechanism);
}