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: MD5 Error PLS-00307: too many declarations of 'MD5' match this call

Re: MD5 Error PLS-00307: too many declarations of 'MD5' match this call

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Thu, 20 Feb 2003 17:01:57 GMT
Message-ID: <MPG.18bea9e17e55c859896bb@news.la.sbcglobal.net>


kev_at_wwwatt.co.uk said...
> Hi
>
> I am trying to write an equilevent PLSQL function fro MD5 equlievent
> to the mysql function. When I try to compile the function below I get
>
> PLS-00307: too many declarations of 'MD5' match this call
>
>
> function MD5(str varchar2)
>
> RETURN VARCHAR2 IS
>
> md_str VARCHAR2(16);
>
>
> BEGIN
>
> md_str := dbms_obfuscation_toolkit.md5(str);
>
> return md_str;
>
> END;
>
> Any ideas what I am doing wrong
>
> Thanks
>
> Kev
>

Got the idea from AskTom.oracle.com and modified it to:

create or replace function md5_digest (
  vin_string IN varchar2
  ) return varchar2 IS

  --
  -- Return an MD5 hash of the input string.
  --

  BEGIN
    return lower(dbms_obfuscation_toolkit.md5 (
             input => utl_raw.cast_to_raw(vin_string)
           ));

  END md5_digest;
-- 
/Karsten
DBA > retired > DBA
Received on Thu Feb 20 2003 - 11:01:57 CST

Original text of this message

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