1. 程式人生 > >oracle中MD5加密

oracle中MD5加密

MD5加密函式

create or replace function md5(in_src in varchar2) return varchar2 is
retval varchar2(128);  
begin

  retval := convert(in_src,'ZHS16GBK');  
  retval := convert(retval,'UTF8');  
  retval := Utl_Raw.Cast_To_Raw(sys.dbms_obfuscation_toolkit.md5(INPUT_STRING  => retval));   
RETURN upper(retval);  
end md5;

呼叫md5函式示例:

select md5('ardo') from dual