Oracle中创建MD5方法

create or replace function MD5(passwd in varchar2) return varchar2 is
  retval varchar2(50);
begin
   retval := utl_raw.cast_to_raw(DBMS_OBFUSCATION_TOOLKIT.MD5(INPUT_STRING => passwd)) ;
   return retval;
end MD5;

用法:

select MD5(password) from table;

posted @ 2013-08-05 11:40  FengLu-1  阅读(862)  评论(0编辑  收藏  举报