Solved

MD5 - Oracle 9i

Posted on 2004-10-20
6
12,297 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 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

624 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