-
Calling overloaded functions
Hi, all
How do I call an overloaded function in Oracle (9i)?
I am trying:
SELECT DBMS_OBFUSCATION_TOOLKIT.DESGETKEY ( 'XXXX' ) FROM DUAL
and get a 'PL-307 too many declarations of 'DESGETKEY' match this call' error message.
There is a version that takes and returns a varchar and another one that takes and retuns a raw.
Thanks in advance.
MP
-
I got the same problem with DBMS_OBFUSCATION_TOOLKIT.MD5... There are 2 functions : one for VARCHAR2 and the other for RAW, but Oracle can't make the difference between the two signatures !
The solution is to use named parameters, but this is not supported in SQL : you have to call it from PL/SQL :
Code:
DECLARE
strTmp VARCHAR2(100);
BEGIN
strTmp := DBMS_OBFUSCATION_TOOLKIT.DESGETKEY ( seed_string => 'XXXX' );
DBMS_OUTPUT.PUT_LINE(strTmp);
END;
/
BTW according to the documentation , seed_string must be at least 80 characters long, so 'XXXX' won't work (I've tested with more than 80 "X" and it works ).
HTH & Regards,
rbaraer
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|