How to calculate MD5 hash in DB2 9.5

2019-05-23 22:18发布

问题:

Is there a function/package available in DB2 9.5 to calculate MD5 hash? Something similar to Oracle's DBMS_OBFUSCATION_TOOLKIT.MD5?

回答1:

There is no built-in function to do this, but you can certainly create your own User Defined Function (UDF).

This Developerworks article contains an implementation: http://www.ibm.com/developerworks/data/library/techarticle/dm-0407tessarek/#UDFs



回答2:

There is GET_HASH_VALUE function in DB2 9.7 part of DBMS_UTILITY system module.

Here is link from documentation :

http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.sql.rtn.doc%2Fdoc%2Fr0055167.html

Hope this is what you were looking for.



标签: db2