PL/SQL (MOSC)

MOSC Banner

DBMS_CRYPTO.ENCRYPT - ORA-28817: PL/SQL function returned an error

in PL/SQL (MOSC) 4 commentsAnswered

Hi,

I am trying to migrate a legacy obfuscation-toolkit procedure to dbms_crypto and do the following in a 21c Oracle Standard Edition - database:

declare
    l_str varchar2(32000);
    l_in_str raw(2000);
    l_iv raw(16);
    l_key raw(2000);
    l_typ pls_integer;
begin
    l_in_str := UTL_I18N.STRING_TO_RAW ('abdeghj',  'AL32UTF8');
    l_iv := hextoraw(DBMS_CRYPTO.LEGACY_DEFAULT_IV);
    l_key := DBMS_CRYPTO.RANDOMBYTES (256/8);
    l_typ:= DBMS_CRYPTO.ENCRYPT_3DES
                                     + DBMS_CRYPTO.CHAIN_CBC
                                     + DBMS_CRYPTO.PAD_NONE;
    l_str :=  DBMS_CRYPTO.ENCRYPT
          (
             src => l_in_str,
             typ => l_typ,
       

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center