apr_md5(8)      DB2 User Defined Function and Stored Procedure      apr_md5(8)




NAME

       apr_md5 - DB2 UDF and SP to generate a seeded MD5 hash


SYNOPSIS

       >>-APR_MD5--(--expression--)-----------------------------------><

       >>-APR_MD5--(--expression--,--hash--)--------------------------><


DESCRIPTION

       Seeded MD5 hash. The apr_md5 routine is compatible to the function used
       in Apache's htpasswd utility.

       The argument can be a character string that is either a CHAR or VARCHAR
       not exceeding 4096 bytes.

       The  result of the function is CHAR(37). The result can be null; if the
       argument is null, the result is the null value.


EXAMPLES

       Example 1:

       Inserting the user test and the seeded md5 hash of the clear text
       testpwd to the table users.

       INSERT INTO USERS (username, password)
         VALUES ('test', apr_md5('testpwd'))

       Example 2:

       SELECT apr_md5('testpwd') FROM SYSIBM.SYSDUMMY1

       1
       -------------------------------------
       $apr1$GfVmOTyJ$n7F1Vkwl/kX8MLgTJq1lp1

         1 record(s) selected.

       Example 3:

       CALL apr_md5('testpwd', ?)

         Value of output parameters
         --------------------------
         Parameter Name  : HASH
         Parameter Value : $apr1$GfVmOTyJ$n7F1Vkwl/kX8MLgTJq1lp1

         Return Status = 0


AUTHOR

       Written by Helmut K. C. Tessarek.


BUGS

       Hopefully none :-) But if you find one, please report it at:
       https://github.com/tessus/db2-hash-routines/issues


WEB SITE

       http://tessus.github.io/db2-hash-routines



apr_md5                            June 2015                        apr_md5(8)