Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> 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_at_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_at_ORA102> host echo Scott|md5sum
55dc8ab2e2970a72fff9dd98cb52dc56 -
scott_at_ORA102> select Criptamd5('Scott'||chr(10)) from dual;
CRIPTAMD5('SCOTT'||CHR(10))
The chr(10) in test is appended because echo does it. Best regards
Maxim Received on Tue May 16 2006 - 11:53:10 CDT
![]() |
![]() |