use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project j2objc by google.
the class RSAMultiPrimePrivateCrtKeySpecTest method testGetPrivateExponent.
/**
* Test for <code>getPrivateExponent()</code> method<br>
* Assertion: returns private exponent
*/
public final void testGetPrivateExponent() {
RSAMultiPrimePrivateCrtKeySpec ks = new RSAMultiPrimePrivateCrtKeySpec(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, opi);
assertTrue(BigInteger.ONE.equals(ks.getPrivateExponent()));
}
use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project j2objc by google.
the class RSAMultiPrimePrivateCrtKeySpecTest method testGetOtherPrimeInfo02.
/**
* Test #2 for <code>getOtherPrimeInfo()</code> method<br>
* Assertion: returns null if null has been passed to the
* constructor as otherPrimeInfo parameter
*/
public final void testGetOtherPrimeInfo02() {
RSAMultiPrimePrivateCrtKeySpec ks = new RSAMultiPrimePrivateCrtKeySpec(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, null);
assertNull(ks.getOtherPrimeInfo());
}
use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project j2objc by google.
the class RSAMultiPrimePrivateCrtKeySpecTest method testGetPrimeQ.
/**
* Test for <code>getPrimeQ()</code> method<br>
* Assertion: returns prime Q
*/
public final void testGetPrimeQ() {
RSAMultiPrimePrivateCrtKeySpec ks = new RSAMultiPrimePrivateCrtKeySpec(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, opi);
assertTrue(BigInteger.ONE.equals(ks.getPrimeQ()));
}
use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project j2objc by google.
the class RSAMultiPrimePrivateCrtKeySpecTest method testGetPrimeExponentP.
/**
* Test for <code>getPrimeExponentP()</code> method<br>
* Assertion: returns prime exponent P
*/
public final void testGetPrimeExponentP() {
RSAMultiPrimePrivateCrtKeySpec ks = new RSAMultiPrimePrivateCrtKeySpec(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, opi);
assertTrue(BigInteger.ONE.equals(ks.getPrimeExponentP()));
}
use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project robovm by robovm.
the class RSAMultiPrimePrivateCrtKeySpecTest method testIsStatePreserved1.
//
// immutability tests
//
/**
* Tests that internal state of the object
* can not be modified by modifying initial array
*/
public final void testIsStatePreserved1() {
// Create initial array
RSAOtherPrimeInfo[] opi1 = opi.clone();
RSAMultiPrimePrivateCrtKeySpec ks = new RSAMultiPrimePrivateCrtKeySpec(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, opi1);
// Modify initial array
opi1[2] = new RSAOtherPrimeInfo(BigInteger.ZERO, BigInteger.ZERO, BigInteger.ZERO);
// Check that above modification
// does not affect internal state
assertTrue(checkOtherPrimeInfo(ks.getOtherPrimeInfo()));
}
Aggregations