Skip to content

Instantly share code, notes, and snippets.

@0xh3x
Created December 10, 2010 10:12
Show Gist options
  • Save 0xh3x/736050 to your computer and use it in GitHub Desktop.
Save 0xh3x/736050 to your computer and use it in GitHub Desktop.
md5 in pl/sql
CREATE OR REPLACE FUNCTION md5_digest(input_string IN VARCHAR2) RETURN VARCHAR2
IS
hex_digest varchar2(32);
digest varchar2(16);
BEGIN digest := DBMS_OBFUSCATION_TOOLKIT.MD5(INPUT_STRING => input_string);
SELECT Lower(RAWTOHEX(digest)) INTO hex_digest FROM dual;
RETURN hex_digest;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment