Search in sources :

Example 21 with RSAMultiPrimePrivateCrtKeySpec

use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project robovm by robovm.

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()));
}
Also used : RSAMultiPrimePrivateCrtKeySpec(java.security.spec.RSAMultiPrimePrivateCrtKeySpec)

Example 22 with RSAMultiPrimePrivateCrtKeySpec

use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project robovm by robovm.

the class RSAMultiPrimePrivateCrtKeySpecTest method testGetPrimeP.

/**
     * Test for <code>getPrimeP()</code> method<br>
     * Assertion: returns prime P
     */
public final void testGetPrimeP() {
    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.getPrimeP()));
}
Also used : RSAMultiPrimePrivateCrtKeySpec(java.security.spec.RSAMultiPrimePrivateCrtKeySpec)

Example 23 with RSAMultiPrimePrivateCrtKeySpec

use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project robovm by robovm.

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()));
}
Also used : RSAMultiPrimePrivateCrtKeySpec(java.security.spec.RSAMultiPrimePrivateCrtKeySpec)

Example 24 with RSAMultiPrimePrivateCrtKeySpec

use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project robovm by robovm.

the class RSAMultiPrimePrivateCrtKeySpecTest method testRSAMultiPrimePrivateCrtKeySpec12.

/**
     * Test #12 for
     * <code>RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus,
     *                                      BigInteger publicExponent,
     *                                      BigInteger privateExponent,
     *                                      BigInteger primeP,
     *                                      BigInteger primeQ,
     *                                      BigInteger primeExponentP,
     *                                      BigInteger primeExponentQ,
     *                                      BigInteger crtCoefficient,
     *                                      RSAOtherPrimeInfo[] otherPrimeInfo)
     * </code> ctor<br>
     * Assertion: constructs <code>RSAMultiPrimePrivateCrtKeySpec</code>
     * object using valid parameters. Constructed object must be
     * instance of RSAPrivateKeySpec.
     */
public final void testRSAMultiPrimePrivateCrtKeySpec12() {
    KeySpec ks = new RSAMultiPrimePrivateCrtKeySpec(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, opi);
    assertTrue(ks instanceof RSAPrivateKeySpec);
}
Also used : RSAPrivateKeySpec(java.security.spec.RSAPrivateKeySpec) RSAMultiPrimePrivateCrtKeySpec(java.security.spec.RSAMultiPrimePrivateCrtKeySpec) RSAPrivateKeySpec(java.security.spec.RSAPrivateKeySpec) KeySpec(java.security.spec.KeySpec) RSAMultiPrimePrivateCrtKeySpec(java.security.spec.RSAMultiPrimePrivateCrtKeySpec)

Example 25 with RSAMultiPrimePrivateCrtKeySpec

use of java.security.spec.RSAMultiPrimePrivateCrtKeySpec in project robovm by robovm.

the class RSAMultiPrimePrivateCrtKeySpecTest method testRSAMultiPrimePrivateCrtKeySpec01.

// Test-cases:
/**
     * Test #1 for
     * <code>RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus,
     *                                      BigInteger publicExponent,
     *                                      BigInteger privateExponent,
     *                                      BigInteger primeP,
     *                                      BigInteger primeQ,
     *                                      BigInteger primeExponentP,
     *                                      BigInteger primeExponentQ,
     *                                      BigInteger crtCoefficient,
     *                                      RSAOtherPrimeInfo[] otherPrimeInfo)
     * </code> ctor<br>
     * Assertion: constructs <code>RSAMultiPrimePrivateCrtKeySpec</code>
     * object using valid parameters
     */
public final void testRSAMultiPrimePrivateCrtKeySpec01() {
    KeySpec ks = new RSAMultiPrimePrivateCrtKeySpec(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, BigInteger.ONE, opi);
    assertTrue(ks instanceof RSAMultiPrimePrivateCrtKeySpec);
}
Also used : RSAMultiPrimePrivateCrtKeySpec(java.security.spec.RSAMultiPrimePrivateCrtKeySpec) RSAPrivateKeySpec(java.security.spec.RSAPrivateKeySpec) KeySpec(java.security.spec.KeySpec) RSAMultiPrimePrivateCrtKeySpec(java.security.spec.RSAMultiPrimePrivateCrtKeySpec)

Aggregations

RSAMultiPrimePrivateCrtKeySpec (java.security.spec.RSAMultiPrimePrivateCrtKeySpec)28 KeySpec (java.security.spec.KeySpec)4 RSAOtherPrimeInfo (java.security.spec.RSAOtherPrimeInfo)4 RSAPrivateKeySpec (java.security.spec.RSAPrivateKeySpec)4