I am currently using jpa attribute converter to encrypt some of the db fields. However, I have a requirement to separate the encrypt keys based on the other field on the entity.
for example, I would like to use key 123456
to encrypt the field name
if org
field is external
, and use key qwert
to encrypt field name
if org
field is internal
.
JPA attribute does not have access to the entity’s other field, so I have to find workarounds.
So is it possible to do this?
Thanks