Call AES_ENCRYPT in sleep mode

How to execute this request in sleep mode?

SELECT AES_ENCRYPT('admin','password') 
+4
source share
1 answer

This, of course, can be done using your own SQL query. Or, if you want to use HQL, it should be possible to expand the MySQL dialogs and register functions (not tested):

 registerFunction("aes_encrypt", new StandardSQLFunction("aes_encrypt", Hibernate.STRING) ) registerFunction("aes_decrypt", new StandardSQLFunction("aes_decrypt", Hibernate.STRING) ) 

Obviously, in both cases this is not portable.

There are also Jasypt UserTypes depending on your specific needs (although does the Jasypt site seem down / dead?)

+2
source

All Articles