Java 类javax.crypto.ExemptionMechanismException 实例源码

项目:In-the-Box-Fork    文件:ExemptionMechanismExceptionTest.java   
/**
 * 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));
    }
}
项目:In-the-Box-Fork    文件:ExemptionMechanismExceptionTest.java   
/**
 * 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));
    }
}
项目:In-the-Box-Fork    文件:ExemptionMechanismTest.java   
@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);
}
项目:In-the-Box-Fork    文件:MyExemptionMechanismSpi.java   
@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");
    }
}
项目:In-the-Box-Fork    文件:MyExemptionMechanismSpi.java   
@Override
protected void engineInit(Key key, AlgorithmParameters params)
        throws InvalidKeyException, InvalidAlgorithmParameterException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
    if (params == null) {
        throw new InvalidAlgorithmParameterException("params is null");
    }
}
项目:In-the-Box-Fork    文件:MyExemptionMechanismSpi.java   
@Override
protected void engineInit(Key key, AlgorithmParameterSpec params)
        throws InvalidKeyException, InvalidAlgorithmParameterException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
    if (params == null) {
        throw new InvalidAlgorithmParameterException("params is null");
    }
}
项目:cn1    文件:ExemptionMechanismExceptionTest.java   
/**
 * 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));
    }
}
项目:cn1    文件:ExemptionMechanismExceptionTest.java   
/**
 * 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));
    }
}
项目:cn1    文件:MyExemptionMechanismSpi.java   
@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");
    }
}
项目:cn1    文件:MyExemptionMechanismSpi.java   
@Override
protected void engineInit(Key key, AlgorithmParameters params)
        throws InvalidKeyException, InvalidAlgorithmParameterException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");            
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
}
项目:cn1    文件:MyExemptionMechanismSpi.java   
@Override
protected void engineInit(Key key, AlgorithmParameterSpec params)
        throws InvalidKeyException, InvalidAlgorithmParameterException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
}
项目:freeVM    文件:ExemptionMechanismExceptionTest.java   
/**
 * 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));
    }
}
项目:freeVM    文件:ExemptionMechanismExceptionTest.java   
/**
 * 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));
    }
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@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");
    }
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@Override
protected void engineInit(Key key, AlgorithmParameters params)
        throws InvalidKeyException, InvalidAlgorithmParameterException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");            
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@Override
protected void engineInit(Key key, AlgorithmParameterSpec params)
        throws InvalidKeyException, InvalidAlgorithmParameterException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
}
项目:freeVM    文件:ExemptionMechanismExceptionTest.java   
/**
 * 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));
    }
}
项目:freeVM    文件:ExemptionMechanismExceptionTest.java   
/**
 * 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));
    }
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@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");
    }
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@Override
protected void engineInit(Key key, AlgorithmParameters params)
        throws InvalidKeyException, InvalidAlgorithmParameterException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");            
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@Override
protected void engineInit(Key key, AlgorithmParameterSpec params)
        throws InvalidKeyException, InvalidAlgorithmParameterException,
        ExemptionMechanismException {
    if (key == null) {
        throw new InvalidKeyException("key is null");
    }
    if (!(key instanceof tmpKey)) {
        throw new ExemptionMechanismException("Incorrect key");
    }
}
项目:In-the-Box-Fork    文件:ExemptionMechanismExceptionTest.java   
protected Object[] getData() {
    return new Object[] { new ExemptionMechanismException(),
            new ExemptionMechanismException(null), new ExemptionMechanismException(msgs[1]) };
}
项目:In-the-Box-Fork    文件:ExemptionMechanismSpiTest.java   
@Override
protected byte[] engineGenExemptionBlob() throws ExemptionMechanismException {
    return super.engineGenExemptionBlob();
}
项目:In-the-Box-Fork    文件:ExemptionMechanismSpiTest.java   
@Override
protected int engineGenExemptionBlob(byte[] output, int outputOffset) throws ShortBufferException, ExemptionMechanismException {
    return super.engineGenExemptionBlob(output, outputOffset);
}
项目:In-the-Box-Fork    文件:ExemptionMechanismSpiTest.java   
@Override
protected void engineInit(Key key) throws InvalidKeyException, ExemptionMechanismException {
    super.engineInit(key);

}
项目:In-the-Box-Fork    文件:ExemptionMechanismSpiTest.java   
@Override
protected void engineInit(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException, ExemptionMechanismException {
    super.engineInit(key, params);

}
项目:In-the-Box-Fork    文件:ExemptionMechanismSpiTest.java   
@Override
protected void engineInit(Key key, AlgorithmParameters params) throws InvalidKeyException, InvalidAlgorithmParameterException, ExemptionMechanismException {
    super.engineInit(key, params);

}
项目:In-the-Box-Fork    文件:ExemptionMechanismTest.java   
@Override
protected byte[] engineGenExemptionBlob()
throws ExemptionMechanismException {
    throw new ExemptionMechanismException();
}
项目:In-the-Box-Fork    文件:MyExemptionMechanismSpi.java   
@Override
protected byte[] engineGenExemptionBlob()
        throws ExemptionMechanismException {
    return new byte[byteArrayLength];
}
项目:In-the-Box-Fork    文件:MyExemptionMechanismSpi.java   
@Override
protected int engineGenExemptionBlob(byte[] output, int outputOffset)
        throws ShortBufferException, ExemptionMechanismException {
    return byteArrayLength;
}
项目:cn1    文件:ExemptionMechanismExceptionTest.java   
protected Object[] getData() {
    return new Object[] { new ExemptionMechanismException(),
            new ExemptionMechanismException(null), new ExemptionMechanismException(msgs[1]) };
}
项目:cn1    文件:MyExemptionMechanismSpi.java   
@Override
protected byte[] engineGenExemptionBlob()
        throws ExemptionMechanismException {
    return new byte[byteArrayLength];
}
项目:cn1    文件:MyExemptionMechanismSpi.java   
@Override
protected int engineGenExemptionBlob(byte[] output, int outputOffset)
        throws ShortBufferException, ExemptionMechanismException {
    return byteArrayLength;
}
项目:freeVM    文件:ExemptionMechanismExceptionTest.java   
protected Object[] getData() {
    return new Object[] { new ExemptionMechanismException(),
            new ExemptionMechanismException(null), new ExemptionMechanismException(msgs[1]) };
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@Override
protected byte[] engineGenExemptionBlob()
        throws ExemptionMechanismException {
    return new byte[byteArrayLength];
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@Override
protected int engineGenExemptionBlob(byte[] output, int outputOffset)
        throws ShortBufferException, ExemptionMechanismException {
    return byteArrayLength;
}
项目:freeVM    文件:ExemptionMechanismExceptionTest.java   
protected Object[] getData() {
    return new Object[] { new ExemptionMechanismException(),
            new ExemptionMechanismException(null), new ExemptionMechanismException(msgs[1]) };
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@Override
protected byte[] engineGenExemptionBlob()
        throws ExemptionMechanismException {
    return new byte[byteArrayLength];
}
项目:freeVM    文件:MyExemptionMechanismSpi.java   
@Override
protected int engineGenExemptionBlob(byte[] output, int outputOffset)
        throws ShortBufferException, ExemptionMechanismException {
    return byteArrayLength;
}