Java 类java.security.AlgorithmParametersSpi 实例源码

项目:j2objc    文件:AlgorithmParametersTest.java   
/**
 * 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");
    }
}
项目:In-the-Box-Fork    文件:AlgorithmParametersTest.java   
/**
 * 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");
    }
}
项目:j2objc    文件:AlgorithmParametersSpiTest.java   
/**
 * 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);
}
项目:j2objc    文件:AlgorithmParametersTest.java   
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi,
        Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}
项目:j2objc    文件:AlgorithmParametersTest.java   
public myAlgP(AlgorithmParametersSpi spi, Provider prov, String alg) {
    super(spi, prov, alg);
}
项目:In-the-Box-Fork    文件:AlgorithmParametersSpiTest.java   
/**
 * 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);
}
项目:In-the-Box-Fork    文件:AlgorithmParametersTest.java   
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi,
        Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}
项目:In-the-Box-Fork    文件:AlgorithmParametersTest.java   
public myAlgP(AlgorithmParametersSpi spi, Provider prov, String alg) {
    super(spi, prov, alg);
}
项目:In-the-Box-Fork    文件:EncryptedPrivateKeyInfoTest.java   
protected Mock_AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}
项目:cn1    文件:AlgorithmParametersTest.java   
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi, 
        Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}
项目:freeVM    文件:AlgorithmParametersTest.java   
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi, 
        Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}
项目:freeVM    文件:AlgorithmParametersTest.java   
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi, 
        Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}