获取字符串对应的MD5值 (AL16UTF16LE)

CREATE OR REPLACE FUNCTION fn_md5_utf16le (InputString IN VARCHAR2)
    RETURN VARCHAR2
IS
  retval   varchar2(50);
/*******************************************************
      用途: 获取字符串对应的MD5值
*******************************************************/
BEGIN
  retval   :=   lower(utl_raw.cast_to_raw(DBMS_OBFUSCATION_TOOLKIT.MD5(INPUT_STRING   =>   convert(InputString,'AL16UTF16LE'))));
  RETURN   retval;
END;
posted on 2016-05-12 15:03  思静  阅读(415)  评论(0编辑  收藏  举报