Package org.jboss.seam.security.management

Examples of org.jboss.seam.security.management.PasswordHash.generateHash()


   @SuppressWarnings("deprecation")
   @Test
   public void testMd5Hash()
   {
      PasswordHash passwordHash = new PasswordHash();
      String hash = passwordHash.generateHash("secret", "MD5");
      assert hash.equals("Xr4ilOzQ4PCOq3aQ0qbuaQ==");
   }
  
   @SuppressWarnings("deprecation")
   @Test
View Full Code Here


   @SuppressWarnings("deprecation")
   @Test
   public void testShaHash()
   {
      PasswordHash passwordHash = new PasswordHash();
      String hash = passwordHash.generateHash("secret", "SHA");
      assert hash.equals("5en6G6MezRroT3XKqkdPOmY/BfQ=");
   }
}
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.