Jasypt Users Forum

Re: Problems with queries that filter on an encrypted column

by nestorjb :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
+------------------------+
  Jasypt Users List      
  http://www.jasypt.org 
+------------------------+

In fact Hibernate does not know that it has to encrypt the value, it treats it like a generic String. Somewhere I have to tell Hibernate that the value needs to be encrypted to apply the where clause.

 

Néstor

 

De: Néstor Boscán [mailto:nestorjb@...]
Enviado el: Monday, February 09, 2009 5:19 PM
Para: 'jasypt-users@...'
Asunto: Problems with queries that filter on an encrypted column

 

Hi

 

I’m using Jasypt 1.5 with Hibernate 3.2 and I’m getting no results when creating queries that filter on an encrypted column. For example:

 

Session.createQuery (“from Client where name = ?”).setString (0, name).uniqueResult ();

 

And YES I’m using a Fixed salt, and I know it works because serializing the same data gives the same encrypted data. I defined a breakpoint on AbstractEncryptedAsStringType.java and is not passing through this class. So it looks to me that the Jasypt + Hibernate solution is not encrypting the values when you set a parameter in a query.

 

Is anyone getting the same behavior?


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
jasypt-users mailing list
jasypt-users@...
https://lists.sourceforge.net/lists/listinfo/jasypt-users