I Have a grails application and i want to secure data before store it in the database. Hibernate grails and jasypt offer this possibility using EncryptedStringType. but this will need a key. where i can store this key ??. please refer to this sample:
encryptor.setPassword("some password here");
encryptor.setAlgorithm("PBEWithMD5AndTripleDES");
String myText = "358904051493345";
System.out.println(myText);
String encryptedText = encryptor.encrypt(myText);
System.out.println(encryptedText);
String decriptedText =
encryptor.decrypt(encryptedText);
System.out.println(decriptedText);