Is there an MD5 Sum function in PL / SQL

In Oracle SQL, is there an MD5 function or something available to me? I would like to do something like ...

select name, md5_sum( name ) from person; 
+8
oracle md5 md5sum
source share
4 answers

See this Tahiti link . In the MD5 Procedures and Functions section, he says that these routines generate MD5 data hashes. The MD5 algorithm ensures data integrity by generating a data value of a 128-bit cryptographic message from data.

Also note that DBMS_OBFUSCATION_TOOLKIT deprecated and may / should be replaced with DBMS_CRYPTO , see this link to Tahiti

+8
source share

You can check the DBMS_OBFUSCATION_TOOLKIT.MD5 procedure.

Here is an example:

  SQL> column md5_val FORMAT A40 SQL> SELECT DBMS_OBFUSCATION_TOOLKIT.md5 (input => UTL_RAW.cast_to_raw('Eddie')) md5_val 2 FROM DUAL; MD5_VAL ---------------------------------------- E5F6C83E6E97C74FC9E9760FC8972AED 1 row selected. 
+12
source share

In 12c you can use STANDARD_HASH . It is available by default, does not require any PL / SQL objects or hard-coded values, and is not deprecated.

 SQL> select standard_hash('Finally, an easy way to do this.', 'MD5') md5 2 from dual; MD5 -------------------------------- 456E4D024B4BB704169E21DEB895B0E2 
+9
source share

don’t think that it comes straight out of the box. you need to define your own.

-4
source share

All Articles