当前位置: 首页>>代码示例>>Java>>正文


Java ExemptionMechanismSpi类代码示例

本文整理汇总了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));
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:38,代码来源:ExemptionMechanismTest.java

示例2: Mock_ExemptionMechanism

import javax.crypto.ExemptionMechanismSpi; //导入依赖的package包/类
protected Mock_ExemptionMechanism(ExemptionMechanismSpi exmechSpi, Provider provider, String mechanism) {
    super(exmechSpi, provider, mechanism);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:4,代码来源:ExemptionMechanismTest.java

示例3: myEM

import javax.crypto.ExemptionMechanismSpi; //导入依赖的package包/类
public myEM(ExemptionMechanismSpi spi, Provider prov, String mechanism) {
    super(spi, prov, mechanism);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:ExemptionMechanism_ImplTest.java


注:本文中的javax.crypto.ExemptionMechanismSpi类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。