use of java.security.AlgorithmParametersSpi in project j2objc by google.
the class AlgorithmParametersTest method testAlgorithmParametersConst.
/**
* Tests OAEP AlgorithmParameters provider
*
TODO(tball): enable when OAEP provider is implemented.
public void testOAEPProvider() throws Exception {
AlgorithmParameters params = AlgorithmParameters.getInstance("OAEP");
assertEquals("Algorithm", "OAEP", params.getAlgorithm());
}
*/
/**
* 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");
}
}
use of java.security.AlgorithmParametersSpi in project robovm by robovm.
the class AlgorithmParametersTest method testAlgorithmParametersConst.
/**
* 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");
}
}
Aggregations