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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 |