本文整理汇总了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];
}