use of java.security.spec.PSSParameterSpec in project j2objc by google.
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 j2objc by google.
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());
}
use of java.security.spec.PSSParameterSpec in project j2objc by google.
the class PSSParameterSpecTest method testPSSParameterSpec0201.
/**
* Test #1 for
* <code>
* PSSParameterSpec(String,String,AlgorithmParameterSpec,int,int)
* </code> ctor<br>
* Assertion: constructs using valid parameters
* <code>PSSParameterSpec<code> object
*/
public final void testPSSParameterSpec0201() {
AlgorithmParameterSpec aps = new PSSParameterSpec("SHA-1", "MGF1", MGF1ParameterSpec.SHA1, 20, 1);
assertTrue(aps instanceof PSSParameterSpec);
}
use of java.security.spec.PSSParameterSpec in project j2objc by google.
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 j2objc by google.
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()));
}
Aggregations