[Opensource] refactor c.j.e.core.security.strongencryption.StringEncryption

larry hamel expresso at codeguild.com
Tue Feb 24 13:33:48 PST 2004


done.

larry

At 09:40 AM 2/17/2004, you wrote:
>Refactor this code to construct the JCE provider by introspection instead
>of hard-coding the class path.
>
>Rationale:
>  You should not need the JCE provider on your build path just to open
>Expresso in an IDE like Eclipse that auto-builds everything nicely.
>This would be like needing a particular JDBC driver in order to
>compile a database example.
>
>Both the historical comments should be removed once you've used them
>to locate where the patch goes.
>
>Sorry this isn't a patch/diff, but the changes are obvious.
>
>   private static final String PROVIDER_NAME = "org.bouncycastle.jce.provider.BouncyCastleProvider";
>
>   //    private Provider theProvider = new cryptix.jce.provider.CryptixCrypto();
>    //private Provider theProvider = new org.bouncycastle.jce.provider.BouncyCastleProvider();
>    private  Provider theProvider;
>
>    /**
>     *
>     *
>     * @throws  ChainedException
>     */
>    public StringEncryption() {
>        super();
>        try {
>                theProvider = (Provider)Class.forName(PROVIDER_NAME).newInstance();
>        } catch (Exception ex){
>                throw new RuntimeException(ex.toString());
>        }
>
>    } /* StringEncryption() */




Larry Hamel
----------------------
Free link-test tool (special handling for Expresso sites): http://morebot.org
Custom web site development: http://codeguild.com  




More information about the Opensource mailing list