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


Java ExemptionMechanismException类代码示例

本文整理汇总了Java中javax.crypto.ExemptionMechanismException的典型用法代码示例。如果您正苦于以下问题:Java ExemptionMechanismException类的具体用法?Java ExemptionMechanismException怎么用?Java ExemptionMechanismException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExemptionMechanismException类属于javax.crypto包,在下文中一共展示了ExemptionMechanismException类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testExemptionMechanismException01

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
/**
 * Test for <code>ExemptionMechanismException()</code> constructor
 * Assertion: constructs ExemptionMechanismException with no detail message
 */
@TestTargetNew(
    level = TestLevel.COMPLETE,
    notes = "",
    method = "ExemptionMechanismException",
    args = {}
)
public void testExemptionMechanismException01() {
    ExemptionMechanismException tE = new ExemptionMechanismException();
    assertNull("getMessage() must return null.", tE.getMessage());
    assertNull("getCause() must return null", tE.getCause());
    try {
        throw tE;
    } catch (Exception e) {
        assertTrue(createErr(tE, e), tE.equals(e));
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:21,代码来源:ExemptionMechanismExceptionTest.java

示例2: testExemptionMechanismException03

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
/**
 * Test for <code>ExemptionMechanismException(String)</code> constructor
 * Assertion: constructs ExemptionMechanismException when <code>msg</code>
 * is null
 */
@TestTargetNew(
    level = TestLevel.COMPLETE,
    notes = "",
    method = "ExemptionMechanismException",
    args = {java.lang.String.class}
)
public void testExemptionMechanismException03() {
    String msg = null;
    ExemptionMechanismException tE = new ExemptionMechanismException(msg);
    assertNull("getMessage() must return null.", tE.getMessage());
    assertNull("getCause() must return null", tE.getCause());
    try {
        throw tE;
    } catch (Exception e) {
        assertTrue(createErr(tE, e), tE.equals(e));
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:23,代码来源:ExemptionMechanismExceptionTest.java

示例3: engineGenExemptionBlob

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
@Override
protected int engineGenExemptionBlob(byte[] output, int outputOffset)
throws ShortBufferException, ExemptionMechanismException {
    if (output.length - outputOffset <
            super.engineGenExemptionBlob(output, outputOffset)) {
        throw new ShortBufferException();
    }
    if (output[outputOffset + 3] == 33) {
        throw new ExemptionMechanismException();
    }
    return super.engineGenExemptionBlob(output, outputOffset);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:13,代码来源:ExemptionMechanismTest.java

示例4: engineInit

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
@Override
protected void engineInit(Key key) throws InvalidKeyException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:11,代码来源:MyExemptionMechanismSpi.java

示例5: testExemptionMechanismException01

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
/**
 * Test for <code>ExemptionMechanismException()</code> constructor
 * Assertion: constructs ExemptionMechanismException with no detail message
 */
public void testExemptionMechanismException01() {
    ExemptionMechanismException tE = new ExemptionMechanismException();
    assertNull("getMessage() must return null.", tE.getMessage());
    assertNull("getCause() must return null", tE.getCause());
    try {
        throw tE;
    } catch (Exception e) {
        assertTrue(createErr(tE, e), tE.equals(e));
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:15,代码来源:ExemptionMechanismExceptionTest.java

示例6: testExemptionMechanismException03

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
/**
 * Test for <code>ExemptionMechanismException(String)</code> constructor
 * Assertion: constructs ExemptionMechanismException when <code>msg</code>
 * is null
 */
public void testExemptionMechanismException03() {
    String msg = null;
    ExemptionMechanismException tE = new ExemptionMechanismException(msg);
    assertNull("getMessage() must return null.", tE.getMessage());
    assertNull("getCause() must return null", tE.getCause());
    try {
        throw tE;
    } catch (Exception e) {
        assertTrue(createErr(tE, e), tE.equals(e));
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:17,代码来源:ExemptionMechanismExceptionTest.java

示例7: getData

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
protected Object[] getData() {
    return new Object[] { new ExemptionMechanismException(),
            new ExemptionMechanismException(null), new ExemptionMechanismException(msgs[1]) };
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:5,代码来源:ExemptionMechanismExceptionTest.java

示例8: engineGenExemptionBlob

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
@Override
protected byte[] engineGenExemptionBlob() throws ExemptionMechanismException {
    return super.engineGenExemptionBlob();
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:5,代码来源:ExemptionMechanismSpiTest.java

示例9: engineInit

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
@Override
protected void engineInit(Key key) throws InvalidKeyException, ExemptionMechanismException {
    super.engineInit(key);

}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:6,代码来源:ExemptionMechanismSpiTest.java

示例10: engineGenExemptionBlob

import javax.crypto.ExemptionMechanismException; //导入依赖的package包/类
@Override
protected byte[] engineGenExemptionBlob()
        throws ExemptionMechanismException {
    return new byte[byteArrayLength];
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:6,代码来源:MyExemptionMechanismSpi.java


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