Package org.owasp.esapi.reference.crypto

Examples of org.owasp.esapi.reference.crypto.DefaultEncryptedProperties


    public void loadProperties(String encryptedPropertiesFilename,
                                  Properties props )
        throws IOException
    {
         EncryptedProperties loader = new DefaultEncryptedProperties();
         loader.load( new FileInputStream(
                                    new File( encryptedPropertiesFilename) ) );

         System.out.println("\n\nLoaded encrypted properties file...");

         try {
             props.setProperty( "database.driver",
                                loader.getProperty( "database.driver" ) );
             props.setProperty( "jdbc.url",
                                loader.getProperty( "jdbc.url" ) );
             props.setProperty( "jdbc.username",
                                loader.getProperty( "jdbc.username" ) );
             props.setProperty( "jdbc.password",
                                loader.getProperty( "jdbc.password" ) );
         } catch( EncryptionException ee ) {
             ee.printStackTrace();
         }
    }
View Full Code Here

TOP

Related Classes of org.owasp.esapi.reference.crypto.DefaultEncryptedProperties

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.