java.security.AlgorithmParametersSpi Java Examples

The following examples show how to use java.security.AlgorithmParametersSpi. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AlgorithmParametersTest.java    From j2objc with Apache License 2.0 6 votes vote down vote up
/**
 * 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");
    }
}
 
Example #2
Source File: AlgorithmParametersSpiTest.java    From j2objc with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
}
 
Example #3
Source File: AlgorithmParametersTest.java    From j2objc with Apache License 2.0 4 votes vote down vote up
public DummyAlgorithmParameters(AlgorithmParametersSpi paramSpi,
        Provider provider, String algorithm) {
    super(paramSpi, provider, algorithm);
}
 
Example #4
Source File: AlgorithmParametersTest.java    From j2objc with Apache License 2.0 4 votes vote down vote up
public myAlgP(AlgorithmParametersSpi spi, Provider prov, String alg) {
    super(spi, prov, alg);
}