本文整理汇总了Java中java.security.AlgorithmParametersSpi类的典型用法代码示例。如果您正苦于以下问题:Java AlgorithmParametersSpi类的具体用法?Java AlgorithmParametersSpi怎么用?Java AlgorithmParametersSpi使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AlgorithmParametersSpi类属于java.security包,在下文中一共展示了AlgorithmParametersSpi类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testAlgorithmParametersConst
import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
/**
* Test for <code>AlgorithmParameters</code> constructor
* Assertion: returns AlgorithmParameters object
*/
public void testAlgorithmParametersConst() throws Exception {
AlgorithmParametersSpi spi = new MyAlgorithmParameters();
AlgorithmParameters ap = new myAlgP(spi, p, "ABC");
checkUnititialized(ap);
ap.init(new byte[6], "aaa");
checkAP(ap, p);
//NULL parameters
try {
ap = new myAlgP(null, null, null);
} catch (Exception e){
fail("Exception should be not thrown");
}
}
示例2: testAlgorithmParametersConst
import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
/**
* Test for <code>AlgorithmParameters</code> constructor
* Assertion: returns AlgorithmParameters object
*/
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "There are no tests with invalid arguments. This is " +
"ok since the effects of calling the constructor with " +
"invalid parameters can not be observed.",
method = "AlgorithmParameters",
args = {java.security.AlgorithmParametersSpi.class, java.security.Provider.class, java.lang.String.class}
)
public void testAlgorithmParametersConst() throws Exception {
AlgorithmParametersSpi spi = new MyAlgorithmParameters();
AlgorithmParameters ap = new myAlgP(spi, p, "ABC");
checkUnititialized(ap);
ap.init(new byte[6], "aaa");
checkAP(ap, p);
//NULL parameters
try {
ap = new myAlgP(null, null, null);
} catch (Exception e){
fail("Exception should be not thrown");
}
}
示例3: testAlgorithmParametersSpi
import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
/**
* Test for <code>AlgorithmParametersSpi</code> constructor
* Assertion: constructs AlgorithmParametersSpi
*/
public void testAlgorithmParametersSpi() {
byte[] bt = new byte[10];
MyAlgorithmParametersSpi algParSpi = new MyAlgorithmParametersSpi();
assertTrue(algParSpi instanceof AlgorithmParametersSpi);
assertNotNull(algParSpi);
algParSpi.engineInit(new MyAlgorithmParameterSpec());
algParSpi.engineInit(bt);
algParSpi.engineInit(bt, "Format");
algParSpi.engineToString();
algParSpi.engineGetEncoded();
algParSpi.engineGetEncoded("Format");
algParSpi.engineGetParameterSpec(java.lang.Class.class);
}
示例4: DummyAlgorithmParameters
import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi,
Provider provider, String algorithm) {
super(paramSpi, provider, algorithm);
}
示例5: myAlgP
import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
public myAlgP(AlgorithmParametersSpi spi, Provider prov, String alg) {
super(spi, prov, alg);
}
示例6: testAlgorithmParametersSpi
import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
/**
* Test for <code>AlgorithmParametersSpi</code> constructor
* Assertion: constructs AlgorithmParametersSpi
*/
@TestTargets({
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "AlgorithmParametersSpi",
args = {}
),
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "engineGetEncoded",
args = {}
),
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "engineGetEncoded",
args = {java.lang.String.class}
),
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "engineGetParameterSpec",
args = {java.lang.Class.class}
),
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "engineInit",
args = {java.security.spec.AlgorithmParameterSpec.class}
),
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "engineInit",
args = {byte[].class}
),
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "engineInit",
args = {byte[].class, java.lang.String.class}
),
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "",
method = "engineToString",
args = {}
)
})
public void testAlgorithmParametersSpi() {
byte[] bt = new byte[10];
MyAlgorithmParametersSpi algParSpi = new MyAlgorithmParametersSpi();
assertTrue(algParSpi instanceof AlgorithmParametersSpi);
assertNotNull(algParSpi);
algParSpi.engineInit(new MyAlgorithmParameterSpec());
algParSpi.engineInit(bt);
algParSpi.engineInit(bt, "Format");
algParSpi.engineToString();
algParSpi.engineGetEncoded();
algParSpi.engineGetEncoded("Format");
algParSpi.engineGetParameterSpec(java.lang.Class.class);
}
示例7: Mock_AlgorithmParameters
import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
protected Mock_AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm) {
super(paramSpi, provider, algorithm);
}
示例8: DummyAlgorithmParameters
import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi,
Provider provider, String algorithm) {
super(paramSpi, provider, algorithm);
}