Created
December 10, 2010 10:12
-
-
Save 0xh3x/736050 to your computer and use it in GitHub Desktop.
md5 in pl/sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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