Unix Technical Forum

MD5 chars string

This is a discussion on MD5 chars string within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi all, I use a simple function for output a MD5 string. belove U can see my resolt. It's ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 10:28 AM
Alen Cappelletti
 
Posts: n/a
Default MD5 chars string

Hi all,
I use a simple function for output a MD5 string.
belove U can see my resolt.

It's possible have one more clear resoult of chars?
'Cause If I call MD5 from mySQL this is the goal.


>From MySQL

74b87337454200d4d33f80c4663dc5e5


>From Oracle

ÂñÚOt/B«R3<ÐT$S


Thanks Alen

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 10:28 AM
Alen Cappelletti
 
Posts: n/a
Default Re: MD5 chars string

opsss....
this is my function...

CREATE FUNCTION CriptaMD5(
p_string in varchar2
)
return varchar2
AS
BEGIN
return dbms_obfuscation_toolkit.md5( input_string => p_string );
END;

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 10:28 AM
Maxim Demenko
 
Posts: n/a
Default Re: MD5 chars string

Alen Cappelletti schrieb:
> opsss....
> this is my function...
>
> CREATE FUNCTION CriptaMD5(
> p_string in varchar2
> )
> return varchar2
> AS
> BEGIN
> return dbms_obfuscation_toolkit.md5( input_string => p_string );
> END;
>


SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 16 18:53:26 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining
Scoring Engine options

scott@ORA102> CREATE FUNCTION Criptamd5(p_String IN VARCHAR2) RETURN
VARCHAR2 AS
2 BEGIN
3 RETURN Rawtohex(Dbms_Obfuscation_Toolkit.Md5(Input =>
Utl_Raw.Cast_To_Raw(p_String)));
4 END;
5 /

Function created.

scott@ORA102> host echo Scott|md5sum
55dc8ab2e2970a72fff9dd98cb52dc56 -

scott@ORA102> select Criptamd5('Scott'||chr(10)) from dual;

CRIPTAMD5('SCOTT'||CHR(10))
-----------------------------------------------------------------------------------------------------------------------------
55DC8AB2E2970A72FFF9DD98CB52DC56

scott@ORA102>



The chr(10) in test is appended because echo does it.
Best regards

Maxim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 10:29 AM
Alen Cappelletti
 
Posts: n/a
Default Re: MD5 chars string

Thank you very mech, U solve me a problem....
Ciao!
Alen, Italy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com