當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。