Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01465: invalid hex number

MuzzDec 21 2017 — edited Dec 21 2017

Just wondering why I'm getting the below error:

Error

ORA-01465: invalid hex number

01465. 00000 -  "invalid hex number"

*Cause:   

*Action:

Function

create or replace FUNCTION         DCR_FN(IN_RAW RAW, IN_KEY RAW) RETURN VARCHAR2

AS

   ENCRYPTED_RAW      RAW (2000);

   OUTPUT_STRING       VARCHAR2(100);

   DECRYPTED_RAW      RAW (2000);

   NUM_KEY_BYTES      NUMBER := 256/8;

   KEY_BYTES_RAW      RAW (32);      

   ENCRYPTION_TYPE    PLS_INTEGER := 

                            DBMS_CRYPTO.ENCRYPT_AES256

                          + DBMS_CRYPTO.CHAIN_CBC

                          + DBMS_CRYPTO.PAD_PKCS5;

BEGIN

   ENCRYPTED_RAW := IN_RAW;

   KEY_BYTES_RAW := IN_KEY;

   DECRYPTED_RAW := DBMS_CRYPTO.DECRYPT

      (

         SRC => ENCRYPTED_RAW,

         typ => encryption_type,

         KEY => KEY_BYTES_RAW

      );

   OUTPUT_STRING := UTL_I18N.RAW_TO_CHAR (DECRYPTED_RAW, 'AL32UTF8'); 

   RETURN OUTPUT_STRING;

END;

Thanks in advance

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2018
Added on Dec 21 2017
4 comments
2,518 views