You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Stanimir Todorov <st...@iguanait.com> on 2008/04/09 13:04:56 UTC

Problems with encrypted fields.

Hi all, 
I have a task to import a lot of data into a new database. Some of the
fields are encrypted. And these fields does a problem.
I have all data in properly xml files. For example <Number
partyId="10000" PersonalNumber="7777777" />.
I am using webtools->XML Data Import Dir with a argument "Create "Dummy"
FKs". In this way I imported the all xmls from the directory at once.
And all that works very well.
The problems come when I restart the server. Then the personalNumber
that shown in user interface is not "7777777", but looks encrypted
something like "74a871acbf060dda5fc7260d05a5924a". And could not be
decrypt, I got the following error:
Problem decrypting field [Number / personalNumber]
     [java] ---- exception report
----------------------------------------------------------
     [java] Problem decrypting field [Number / personalNumber]
     [java] Exception: org.ofbiz.entity.EntityCryptoException
     [java] Message: Given final block not properly padded
     [java] ---- stack trace
---------------------------------------------------------------

I am using for now Derby DB. But the same problem appears on the
Postgres DB also. What is the different after the restart?

Other problem is that I can not search by encrypted fields for example
PersonalNumber or Credit Card Number. I need this feature. Is it
possible to search by encrypted fields? I try thru the Webtools but
unsuccessful.

I will appreciate all advices, Thanks!
Stanimir