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
Solved

MD5 - Oracle 9i

Posted on 2004-10-20
6
12,265 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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 300 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

860 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