Package ch.inftec.ju.security

Examples of ch.inftec.ju.security.JuTextEncryptor


    Assert.assertFalse(chain.get("booleanProp2", Boolean.class));
  }
 
  @Test
  public void propertyChain_decryptsEncryptedValues() {
    JuTextEncryptor encryptor = JuSecurityUtils.buildEncryptor()
      .password("secret")
      .createTextEncryptor();

    //encryptor.encrypt("secret String");
    //Sample value: bSmw4g8BdopiLClgC7zU2Kwr0LyRqj79
View Full Code Here


    Assert.assertEquals("PropertyChainBuilder.PropertiesPropertyEvaluator[]", pi.getEvaluatorInfo());
  }
 
  @Test
  public void propertyChain_getPropertyInfo_forEncryptedValue() {
    JuTextEncryptor encryptor = JuSecurityUtils.buildEncryptor()
      .password("secret")
      .createTextEncryptor();

    //encryptor.encrypt("secret String");
    //Sample value: bSmw4g8BdopiLClgC7zU2Kwr0LyRqj79
View Full Code Here

 
  @Test
  public void canEncryptText_usingStrongEncryptor() {
    JuAssumeUtils.javaCryptographyExtensionInstalled();
   
    JuTextEncryptor encryptor = JuSecurityUtils.buildEncryptor()
        .strong()
        .password("secret")
        .createTextEncryptor();
   
    String encryptedString = encryptor.encrypt("String"); // The encrypted String will not be constant...
    Assert.assertNotNull(encryptor.encrypt("String"));
    Assert.assertEquals("String", encryptor.decrypt(encryptedString));
  }
View Full Code Here

TOP

Related Classes of ch.inftec.ju.security.JuTextEncryptor

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.