Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: MD5 chars string

Re: MD5 chars string

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Tue, 16 May 2006 18:53:10 +0200
Message-ID: <446a04ad$0$11075$9b4e6d93@newsread4.arcor-online.net>


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))



55DC8AB2E2970A72FFF9DD98CB52DC56 scott_at_ORA102>

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

Maxim Received on Tue May 16 2006 - 11:53:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US