本文整理汇总了Java中javax.crypto.ExemptionMechanismSpi类的典型用法代码示例。如果您正苦于以下问题:Java ExemptionMechanismSpi类的具体用法?Java ExemptionMechanismSpi怎么用?Java ExemptionMechanismSpi使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExemptionMechanismSpi类属于javax.crypto包,在下文中一共展示了ExemptionMechanismSpi类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test_getOutputSizeI
import javax.crypto.ExemptionMechanismSpi; //导入依赖的package包/类
@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));
}
示例2: Mock_ExemptionMechanism
import javax.crypto.ExemptionMechanismSpi; //导入依赖的package包/类
protected Mock_ExemptionMechanism(ExemptionMechanismSpi exmechSpi, Provider provider, String mechanism) {
super(exmechSpi, provider, mechanism);
}
示例3: myEM
import javax.crypto.ExemptionMechanismSpi; //导入依赖的package包/类
public myEM(ExemptionMechanismSpi spi, Provider prov, String mechanism) {
super(spi, prov, mechanism);
}