本文整理匯總了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));
}
}
示例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));
}
}
示例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);
}
示例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");
}
}
示例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));
}
}
示例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));
}
}
示例7: getData
import javax.crypto.ExemptionMechanismException; //導入依賴的package包/類
protected Object[] getData() {
return new Object[] { new ExemptionMechanismException(),
new ExemptionMechanismException(null), new ExemptionMechanismException(msgs[1]) };
}
示例8: engineGenExemptionBlob
import javax.crypto.ExemptionMechanismException; //導入依賴的package包/類
@Override
protected byte[] engineGenExemptionBlob() throws ExemptionMechanismException {
return super.engineGenExemptionBlob();
}
示例9: engineInit
import javax.crypto.ExemptionMechanismException; //導入依賴的package包/類
@Override
protected void engineInit(Key key) throws InvalidKeyException, ExemptionMechanismException {
super.engineInit(key);
}
示例10: engineGenExemptionBlob
import javax.crypto.ExemptionMechanismException; //導入依賴的package包/類
@Override
protected byte[] engineGenExemptionBlob()
throws ExemptionMechanismException {
return new byte[byteArrayLength];
}