Package java.security

Examples of java.security.NoSuchProviderException


    CertificateException, UnrecoverableKeyException, NoSuchProviderException {
       
        try {
            InitJCE.init();
        } catch (InstantiationException e) {
            NoSuchProviderException ex = new NoSuchProviderException("Error during cryptography provider initialization. Has bcprov-jdkxx-yyy.jar been copied in the lib directory or installed in the system?");
            ex.initCause(e);
            throw ex;
        } catch (IllegalAccessException e) {
            NoSuchProviderException ex = new NoSuchProviderException("Error during cryptography provider initialization. Has bcprov-jdkxx-yyy.jar been copied in the lib directory or installed in the system?");
            ex.initCause(e);
            throw ex;
        } catch (ClassNotFoundException e) {
            NoSuchProviderException ex = new NoSuchProviderException("Error during cryptography provider initialization. Has bcprov-jdkxx-yyy.jar been copied in the lib directory or installed in the system?");
            ex.initCause(e);
            throw ex;
        }

        if (keyStoreType == null) {
            keyStoreType = KeyStore.getDefaultType();
View Full Code Here


            throw new IllegalArgumentException(Messages.getString("crypto.04")); //$NON-NLS-1$
        }

        Provider p = Security.getProvider(provider);
        if (p == null) {
            throw new NoSuchProviderException(Messages.getString("crypto.16", provider)); //$NON-NLS-1$
        }
        return getInstance(transformation, p);
    }
View Full Code Here

     * Assertion: constructs NoSuchProviderException when <code>msg</code> is
     * null
     */
    public void testNoSuchProviderException03() {
        String msg = null;
        NoSuchProviderException tE = new NoSuchProviderException(msg);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    }
View Full Code Here

    public static String[] msgs = {
            "New message",
            "Long message for Exception. Long message for Exception. Long message for Exception." };

    protected Object[] getData() {
        return new Object[] { new NoSuchProviderException(),
                new NoSuchProviderException(null),
                new NoSuchProviderException(msgs[1]) };
    }
View Full Code Here

    /**
     * Test for <code>NoSuchProviderException()</code> constructor Assertion:
     * constructs NoSuchProviderException with no detail message
     */
    public void testNoSuchProviderException01() {
        NoSuchProviderException tE = new NoSuchProviderException();
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    }
View Full Code Here

     * Test for <code>NoSuchProviderException(String)</code> constructor
     * Assertion: constructs NoSuchProviderException with detail message msg.
     * Parameter <code>msg</code> is not null.
     */
    public void testNoSuchProviderException02() {
        NoSuchProviderException tE;
        for (int i = 0; i < msgs.length; i++) {
            tE = new NoSuchProviderException(msgs[i]);
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
                    .getMessage(), msgs[i]);
            assertNull("getCause() must return null", tE.getCause());
        }
    }
View Full Code Here

    {
        Provider prov = Security.getProvider(providerName);

        if (prov == null)
        {
            throw new NoSuchProviderException("provider " + providerName + " not found.");
        }

        return prov;
    }
View Full Code Here

        if ((provider == null) || (provider.length() == 0)) {
            throw new IllegalArgumentException(Messages.getString("crypto.03")); //$NON-NLS-1$
        }
        Provider impProvider = Security.getProvider(provider);
        if (impProvider == null) {
            throw new NoSuchProviderException(provider);
        }
        return getInstance(algorithm, impProvider);
    }
View Full Code Here

        if ((provider == null) || (provider.length() == 0)) {
            throw new IllegalArgumentException(Messages.getString("security.02")); //$NON-NLS-1$
        }
        Provider impProvider = Security.getProvider(provider);
        if (impProvider == null) {
            throw new NoSuchProviderException(provider);
        }
        return getInstance(type, params, impProvider);
    }
View Full Code Here

        if ((provider == null) || (provider.length() == 0)) {
            throw new IllegalArgumentException(Messages.getString("security.02")); //$NON-NLS-1$
        }
        Provider impProvider = Security.getProvider(provider);
        if (impProvider == null) {
            throw new NoSuchProviderException(provider);
        }
        return getInstance(algorithm, impProvider);

    }
View Full Code Here

TOP

Related Classes of java.security.NoSuchProviderException

Copyright © 2018 www.massapicom. 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.