Examples of RSAMultiPrimePrivateCrtKeySpec


Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

    /**
     * Test for <code>getPublicExponent()</code> method<br>
     * Assertion: returns public exponent
     */
    public final void testGetPublicExponent() {
        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.getPublicExponent()));
    }
View Full Code Here

Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

    /**
     * Test #1 for <code>getOtherPrimeInfo()</code> method<br>
     * Assertion: returns array of RSAOtherPrimeInfo
     */
    public final void testGetOtherPrimeInfo01() {
        RSAMultiPrimePrivateCrtKeySpec ks =
            new RSAMultiPrimePrivateCrtKeySpec(
                    BigInteger.ONE,
                    BigInteger.ONE,
                    BigInteger.ONE,
                    BigInteger.ONE,
                    BigInteger.ONE,
                    BigInteger.ONE,
                    BigInteger.ONE,
                    BigInteger.ONE,
                    opi);
        assertTrue(checkOtherPrimeInfo(ks.getOtherPrimeInfo()));
    }
View Full Code Here

Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

     * 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());
    }
View Full Code Here

Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

     */
    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()));
    }
View Full Code Here

Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

     */
    public final void testIsStatePreserved2() {
        // 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);
       
        RSAOtherPrimeInfo[] ret = ks.getOtherPrimeInfo();
       
        // Modify returned array
        ret[2] = new RSAOtherPrimeInfo(BigInteger.ZERO,
                BigInteger.ZERO,
                BigInteger.ZERO);
       
        // Check that above modification
        // does not affect internal state
        assertTrue(checkOtherPrimeInfo(ks.getOtherPrimeInfo()));
    }
View Full Code Here

Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

    /**
     * Test for <code>getModulus()</code> method<br>
     * Assertion: returns modulus
     */
    public final void testGetModulus() {
        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.getModulus()));
    }
View Full Code Here

Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

    /**
     * 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()));
    }
View Full Code Here

Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

          otherInfo[i] = new RSAOtherPrimeInfo(otherPrime,
                                         otherPrimeExponent,
                                         otherCrtCoefficient);
        }

        spec = new RSAMultiPrimePrivateCrtKeySpec(modulus,
                                                              publicExponent,
                                                              privateExponent,
                                                              primeP,
                                                              primeQ,
                                                              primeExponentP,
View Full Code Here

Examples of java.security.spec.RSAMultiPrimePrivateCrtKeySpec

          otherInfo[i] = new RSAOtherPrimeInfo(otherPrime,
                                         otherPrimeExponent,
                                         otherCrtCoefficient);
        }

        spec = new RSAMultiPrimePrivateCrtKeySpec(modulus,
                                                              publicExponent,
                                                              privateExponent,
                                                              primeP,
                                                              primeQ,
                                                              primeExponentP,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.