Jasypt 1.9.0 RELEASED! (December 18th, 2011) [DOWNLOAD and ChangeLogs] [WHAT'S NEW IN JASYPT 1.9]
Did you know? Jasypt's configuration encryption features have been featured in Spring in Action, 3rd Edition
Jasypt is a java library which allows the developer to add basic encryption capabilities to his/her projects with minimum effort, and without the need of having deep knowledge on how cryptography works.
Have a look at the complete set of Jasypt Features or check the FAQ.
With Jasypt, encrypting and checking a password can be as simple as...
BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
String encryptedPassword = passwordEncryptor.encryptPassword(userPassword);
...
if (passwordEncryptor.checkPassword(inputPassword, encryptedPassword)) {
// correct!
} else {
// bad login!
}
...encrypting and decrypting a text...
BasicTextEncryptor textEncryptor = new BasicTextEncryptor(); textEncryptor.setPassword(myEncryptionPassword); String myEncryptedText = textEncryptor.encrypt(myText); ... String plainText = textEncryptor.decrypt(myEncryptedText);
...and what about encrypting some sensitive data directly from Hibernate?
<class name="Employee" table="EMPLOYEE"> ... <property name="address" column="ADDRESS" type="encryptedString" /> <property name="salary" column="SALARY" type="encryptedDecimal" /> ... <class>
But of course, besides easy, jasypt is highly configurable. You will be able to choose encryption algorithms, salt generation and many more advanced features...