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

时间:2023-03-08 17:51:57
获取字符串对应的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;