java - Encrypting @Lob byte[] column type with jasypt -


i'm trying encrypt byte[] field jasypt.

my code before encryption

@entity public class contentfile { ... @column(name = "filecontent") @lob private byte[] filecontent; ... } 

normally gets mapped in db blob in oracle , h2 use. after adding encryption have this

@typedef(name = typedefname.encrypted_byte_array, typeclass = encryptedbinarytype.class, parameters = { @parameter(name = typedefparamname.encryptor_registered_name, value = encryptorregisteredname.hibernate_binary_encryptor) }) @entity public class contentfile { ... @type(type = typedefname.encrypted_byte_array) @column(name = "filecontent") @lob private byte[] filecontent; ... } 

but generated schema different - raw(255) in oracle , binary(255) in h2, , of course produces errors since byte array bigger. looks @lob ignored when @type put, there way tell jasypt/hibernate byte[] should in fact blob?


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -