use of java.security.spec.PSSParameterSpec in project robovm by robovm.
the class PSSParameterSpecTest method testGetMGFParameters01.
/**
* Test #1 for <code>getMGFParameters()</code> method
* Assertion: returns mask generation function parameters
*/
public final void testGetMGFParameters01() {
PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1, 20, 1);
assertTrue(MGF1ParameterSpec.SHA1.equals(pssps.getMGFParameters()));
}
use of java.security.spec.PSSParameterSpec in project robovm by robovm.
the class PSSParameterSpecTest method testGetMGFAlgorithm.
/**
* Test for <code>getMGFAlgorithm()</code> method
* Assertion: returns mask generation function algorithm name
*/
public final void testGetMGFAlgorithm() {
PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1, 20, 1);
assertEquals("MGF1", pssps.getMGFAlgorithm());
}
use of java.security.spec.PSSParameterSpec in project robovm by robovm.
the class PSSParameterSpecTest method testPSSParameterSpec0101.
/**
* Test #1 for <code>PSSParameterSpec(int)</code> ctor<br>
* Assertion: constructs using valid parameter
* <code>PSSParameterSpec<code> object
*/
public final void testPSSParameterSpec0101() {
AlgorithmParameterSpec aps = new PSSParameterSpec(20);
assertTrue(aps instanceof PSSParameterSpec);
}
use of java.security.spec.PSSParameterSpec in project robovm by robovm.
the class PSSParameterSpecTest method testGetDigestAlgorithm.
/**
* Test for <code>getDigestAlgorithm()</code> method
* Assertion: returns message digest algorithm name
*/
public final void testGetDigestAlgorithm() {
PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1, 20, 1);
assertEquals("SHA-1", pssps.getDigestAlgorithm());
}
use of java.security.spec.PSSParameterSpec in project robovm by robovm.
the class PSSParameterSpecTest method testGetMGFParameters02.
/**
* Test #2 for <code>getMGFParameters()</code> method
* Assertion: returns <code>null</code>
* if <code>null</code> had been passed as
* AlgorithmParameterSpec parameter to the ctor
*/
public final void testGetMGFParameters02() {
PSSParameterSpec pssps = new PSSParameterSpec("SHA-1", "MGF1", null, 20, 1);
assertNull(pssps.getMGFParameters());
}
Aggregations