Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: [8.1.7] Anyone using the DBMS_OBFUSCATION_TOOLKIT.MD5 function ?

Re: [8.1.7] Anyone using the DBMS_OBFUSCATION_TOOLKIT.MD5 function ?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 19 Nov 2001 17:16:54 -0000
Message-ID: <1006190091.16669.0.nnrp-14.9e984b29@news.demon.co.uk>

The function MD5 is overloaded as:

    FUNCTION MD5(input IN RAW)

        RETURN raw_checksum;

and

    FUNCTION MD5(input_string    IN     VARCHAR2)
        RETURN varchar2_checksum;


I wonder if the substr() in your call is causing Oracle to fail in identifying which of the two versions of the function it should be using.

Note that Thomas Kyte's call used the 'named parameter' convention when calling the function, thus resolving the correct function explicitly - this may be all you need to do to solve your problem.
need to do

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases

Screen saver or Life saver: http://www.ud.com
Use spare CPU to assist in cancer research.

davide_at_yahoo.com wrote in message
<9tb1sd$1cje6$1_at_ID-18487.news.dfncis.de>...

>
>I have to use the DBMS_OBFUSCATION_TOOLKIT.MD5 function to crypt a
>password that I receive from another system, there are some problems
>thought. The first one is that the MD5 family of functions aren't
>described in the documentation, the second (much more important) is
>that anytime I try to use it, it complains that the function to use
>is not clear.
>
>This is my "bridge" function :
>
>create or replace function crypt(instring varchar2)
>return varchar2 as
> tmpstring varchar2(32);
>begin
> tmpstring := substr(instring,1,32);
> tmpstring := dbms_obfuscation_toolkit.md5(tmpstring);
> return substr(rawtohex(tmpstring),1,32);
>
>end crypt;
>
>trying to compile this function I obtain:
>
>SQL> show err;
>Errors for FUNCTION CRYPT:
>
>LINE/COL ERROR
>-------- -----------------------------------------------------------------
>6/2 PL/SQL: Statement ignored
>6/15 PLS-00307: too many declarations of 'MD5' match this call
>SQL>
>
>Anyone have some hints ?
>
>Davide
>
Received on Mon Nov 19 2001 - 11:16:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US