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




NAME

       apr_crypt - DB2 UDF and SP to generate a seeded CRYPT


SYNOPSIS

       >>-APR_CRYPT--(--expression--)---------------------------------><

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


DESCRIPTION

       Unix crypt. The apr_crypt 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(13). 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 crypted clear text testpwd to the table
       users.

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

       Example 2:

       SELECT apr_crypt('testpwd') FROM SYSIBM.SYSDUMMY1

       1
       -------------
       cqs7uOvz8KBlk

         1 record(s) selected.

       Example 3:

       CALL apr_crypt('testpwd', ?)

         Value of output parameters
         --------------------------
         Parameter Name  : HASH
         Parameter Value : cqs7uOvz8KBlk

         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_crypt                          June 2015                      apr_crypt(8)