Link to home
Start Free TrialLog in
Avatar of Lawrence Avery
Lawrence AveryFlag for United States of America

asked on

dbms_crypto.decrypt errors out

dbms_crypto.decrypt( src => utl_raw.cast_to_raw(p_data),typ => DBMS_CRYPTO.DES_CBC_PKCS5,key => V_KEY );
How do I resolve the following:
I receive
ORA-28817: PL/SQL function returned an error.
ORA-06512: at "SYS.DBMS_CRYPTO_FFI", line 67
ORA-06512: at "SYS.DBMS_CRYPTO", line 44
ORA-06512: at "SAFEPAY.DECRYPT_DATA", line 6
28817. 00000 -  "PL/SQL function returned an error."
*Cause:    A PL/SQL function returned an error unexpectedly.
*Action:   This is an internal error. Enable tracing to find more
           information. Contact Oracle customer support if needed.
*Document: NO
-------------------------------------------------------------------------------------------------------------------------------------------
I found the following:
The charset of the machine is en_US.UTF-8. The charset of the Oracle db is WE8MSWIN1252.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

First:  Is SAFEPAY safe to post in a public site?

Back to the question:
Did it ever work?

If not,  try to eliminate the character sets:
Can you run the same code logged directly into the database server?
Is the source for the data coming from the UTF8 or is the data always on the server?

If it used to work but doesn't now, what changed?

You will likely need to follow the error message advice and work with Oracle Support.
Avatar of Lawrence Avery

ASKER

We imported .dmp file from windows folder.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
After import was done.
My guess is what was talked about in your other questions:  The change in character sets probably corrupted the data so it cannot be decrypted.  It also did so in such a way that causes the decrypt to generate an error.

This is only an educated guess.  Oracle Support can confirm the guess.
Taking an action on what contributor mentioned.