Solved

MD5 - Oracle 9i

Posted on 2004-10-20
6
12,231 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
Comment Utility
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
Comment Utility
Hi konektor, does this toolkit is shipped with Oracle 9i?

tnx
0
 
LVL 9

Expert Comment

by:konektor
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

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.

Join & Write a Comment

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 post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Via a live example, show how to take different types of Oracle backups using RMAN.

762 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now