Closed dentalpolitics closed 9 years ago
Just in case someone else is scouring the internet for a solution, here is a work-around for non-spring apps: 1) in hibernate.cfg.xml, put:
2) when initializing the session factory: StandardPBEStringEncryptor strongEncryptor = new StandardPBEStringEncryptor(); strongEncryptor.setAlgorithm("PBEWithMD5AndDES"); strongEncryptor.setPassword([encryption key here]); Configuration cfg = new Configuration().configure("/hibernate.cfg.xml"); EncryptableProperties props = new EncryptableProperties(cfg.getProperties(),strongEncryptor); cfg.setProperty("hibernate.connection.password",props.getProperty("hibernate.connection.password")); factory = cfg.addAnnotatedClass(HibUser.class).buildSessionFactory();
Hi, I noticed that the new hibernate-hikaricp connection provider doesn't seem to provide any support for Jasypt encryption. I managed to make hikaricp to work with a jasypt encrypted password through the jasypt-spring-boot-starter package but I also have non-spring applications and I couldn't find an encryption solution for those. Did I miss anything ? Looks like EncryptedDriverManagerConnectionProviderImpl from the jasypt-hibernate4-ext package provides such on-the-fly decryption concept. In the same way, would it be possible to integrate a jasypt decryptor in hikaricp's connection provider ? best regards kbjp