DBMS_OBFUSCATION_TOOLKIT.md5 and RAWTOHEX : DBMS_OBFUSCATION_TOOLKIT « System Packages « Oracle PL / SQL






DBMS_OBFUSCATION_TOOLKIT.md5 and RAWTOHEX

  
SQL>
SQL> CREATE OR REPLACE FUNCTION get_hash_val (p_in VARCHAR2)
  2     RETURN VARCHAR2
  3  IS
  4     l_hash   VARCHAR2 (2000);
  5  BEGIN
  6     l_hash :=RAWTOHEX(UTL_RAW.cast_to_raw(DBMS_OBFUSCATION_TOOLKIT.md5 (input_string=> p_in)));
  7     RETURN l_hash;
  8  END;
  9  /

Function created.

SQL>
SQL> select get_hash_val('12345') from dual;

GET_HASH_VAL('12345')
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

827CCB0EEA8A706C4C34A16891F84E7B

SQL>

   
  








Related examples in the same category

1.DBMS_OBFUSCATION_TOOLKIT.des3getkey
2.DBMS_OBFUSCATION_TOOLKIT.des3encrypt
3.DBMS_OBFUSCATION_TOOLKIT.des3decrypt
4.dbms_obfuscation_toolkit.md5
5.Demonstrate DES3 encryption