当前位置: 首页>>代码示例>>Java>>正文


Java AlgorithmParametersSpi类代码示例

本文整理汇总了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");
    }
}
 
开发者ID:Sellegit,项目名称:j2objc,代码行数:20,代码来源:AlgorithmParametersTest.java

示例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");
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:28,代码来源:AlgorithmParametersTest.java

示例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);
}
 
开发者ID:Sellegit,项目名称:j2objc,代码行数:19,代码来源:AlgorithmParametersSpiTest.java

示例4: DummyAlgorithmParameters

import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi,
        Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}
 
开发者ID:Sellegit,项目名称:j2objc,代码行数:5,代码来源:AlgorithmParametersTest.java

示例5: myAlgP

import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
public myAlgP(AlgorithmParametersSpi spi, Provider prov, String alg) {
    super(spi, prov, alg);
}
 
开发者ID:Sellegit,项目名称:j2objc,代码行数:4,代码来源:AlgorithmParametersTest.java

示例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);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:69,代码来源:AlgorithmParametersSpiTest.java

示例7: Mock_AlgorithmParameters

import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
protected Mock_AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:4,代码来源:EncryptedPrivateKeyInfoTest.java

示例8: DummyAlgorithmParameters

import java.security.AlgorithmParametersSpi; //导入依赖的package包/类
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi, 
		Provider provider, String algorithm) {
	super(paramSpi, provider, algorithm);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:5,代码来源:AlgorithmParametersTest.java


注:本文中的java.security.AlgorithmParametersSpi类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。