Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MD5 - Oracle 9i

Posted on 2004-10-20
6
Medium Priority
?
12,320 Views
Last Modified: 2012-06-21
Hi all, I need to do this:

extracting last sequence then applying to it the Oracke 9i built-in MD5 function

also I need to know what is type of the PK field I have to use ...maybe VARCHAR2(32)

tnx n regards

D-
0
Comment
Question by:amolabravo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:konektor
ID: 12356614
md5 is part of dbms_obfuscation_toolkit package

    PROCEDURE MD5(input    IN  RAW,
                  checksum OUT raw_checksum);

    FUNCTION MD5(input    IN  RAW)
        RETURN raw_checksum;

    PROCEDURE MD5(input_string    IN     VARCHAR2,
                  checksum_string    OUT varchar2_checksum);

    FUNCTION MD5(input_string    IN     VARCHAR2)
        RETURN varchar2_checksum;
0
 

Author Comment

by:amolabravo
ID: 12357065
Hi konektor, does this toolkit is shipped with Oracle 9i?

tnx
0
 
LVL 9

Expert Comment

by:konektor
ID: 12357085
yes, sys is owner of it.
i don't know if u have to choose some special option during installation, but i have the package on all instances i have access to.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:amolabravo
ID: 12357184
hi, can u send me an example of the application to this function to a simple query? ...also I can call it directly from a query embedded in the code ?

tnx n regards
0
 
LVL 22

Accepted Solution

by:
earth man2 earned 900 total points
ID: 12357275
SQL> create or replace function md5( input varchar2 ) return sys.dbms_obfuscation_toolkit.varchar2_checksum as
begin
  return sys.dbms_obfuscation_toolkit.md5( input_string => input );
 end;
/

SQL> select md5('Hello World !' ) from dual;
MD5('HELLOWORLD!')
----------------------------
╣ƒ>⌠☺┐ß┐$┐o┐c╣α♠
0
 
LVL 9

Expert Comment

by:konektor
ID: 12357305
SQL> declare
  2    x varchar2(100) := 'abcdefghijklmnopqrstuvwxyz';
  3    y dbms_obfuscation_toolkit.varchar2_checksum;
  4  begin
  5    dbms_obfuscation_toolkit.md5(input_string => x, checksum_string => y);
  6    dbms_output.put_line(y);
  7  end;
  8  /
ÃüÓ×a’ä
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to recover a database from a user managed backup
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question