oracle md5 hash

oracle md5 hash


CREATE   OR   REPLACE   FUNCTION  USERINFO.md5hash ( str   IN   VARCHAR2 )
    
RETURN   VARCHAR2
    
IS  v_checksum  VARCHAR2 ( 32 );

    
BEGIN
        v_checksum :
=   LOWER ( RAWTOHEX( UTL_RAW.CAST_TO_RAW( sys.dbms_obfuscation_toolkit.md5(input_string  =>   str ) ) ) );
        
RETURN  v_checksum;
        EXCEPTION
            
WHEN  NO_DATA_FOUND  THEN
            
NULL ;
        
WHEN  OTHERS  THEN
            
--  Consider logging the error and then re-raise
            RAISE;
    
END  md5hash;
/

参考:
http://stackoverflow.com/questions/22533037/how-to-call-oracle-md5-hash-function

https://docs.oracle.com/cd/E17952_01/refman-5.1-en/encryption-functions.html

http://blog.csdn.net/junmail/article/details/4358516


 

你可能感兴趣的:(oracle md5 hash)