Package org.jasypt.properties

Examples of org.jasypt.properties.EncryptableProperties.store()


      // --Add a non encrypted propety
      properties.setProperty("LOGIN", "MY_LOGIN");
      // Save properties to a file
      File f = File.createTempFile("JASYPT", ".properties");
      fos = new FileOutputStream(f);
      properties.store(fos, "Sample properties file");
      System.out.printf("testPropertiesFilePropertiesEncryption : Properties file saved to '%s'\n", f.getAbsolutePath());
      // Clear all properties and reload properties file
      properties.clear();
      Assert.assertNull(properties.getProperty("PASSWORD"));
      Assert.assertNull(properties.getProperty("LOGIN"));
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.