Problems with encrypted fields.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problems with encrypted fields.

stodorov
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