openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: Encryption and Decryption
Date Fri, 08 Jul 2011 00:50:45 GMT
An alternative suggestion to Kevin's solution via callbacks for
encryption/decryption is the following:

OpenJPA can annotate any persistent property p with an @Externalizer. The
application supplies the function that can encode/decode value of p to
another value suitable for database stoarge. For example, one can declare a
field such as
  @Externalizer
  private java.net.URL website;

and make the URL be stored as a string (VARCHAR) in the database. 

So, encryption/decryption of specific persistent field can be achieved via
@Externalizer which perhaps will change a String value to an encrypted
String value. 

See the documentation and examples [1].


[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_extern_values




-----
Pinaki 
--
View this message in context: http://openjpa.208410.n2.nabble.com/Encryption-and-Decryption-tp6558521p6560604.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message