Hash/digest function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Troels Arvin

    #1

    Hash/digest function

    Hello,

    I'm looking for a built-in hashing/digest function in DB2, e.g. MD5 or
    SHA1. It seems there is no such thing. Or have I overlooked something?

    If I were to add md5sum to db2 as a c- or java-based function: Is there a
    repository of popular ready-to-compile DB2-functions somewhere?

    --
    Regards,
    Troels Arvin <troels@arvin.d k>

  • Lennart

    #2
    Re: Hash/digest function

    On Feb 20, 12:50 am, Troels Arvin <tro...@arvin.d kwrote:
    Hello,
    >
    I'm looking for a built-in hashing/digest function in DB2, e.g. MD5 or
    SHA1. It seems there is no such thing. Or have I overlooked something?
    >
    If I were to add md5sum to db2 as a c- or java-based function: Is there a
    repository of popular ready-to-compile DB2-functions somewhere?
    >
    Found this:



    haven't tried it


    /Lennart

    --
    Regards,
    Troels Arvin <tro...@arvin.d k>http://troels.arvin.dk/

    Comment

    • Kenevel

      #3
      Re: Hash/digest function

      On 19 Feb, 22:50, Troels Arvin <tro...@arvin.d kwrote:
      Hello,
      >
      I'm looking for a built-in hashing/digest function in DB2, e.g. MD5 or
      SHA1. It seems there is no such thing. Or have I overlooked something?
      >
      Hi Troels,

      I looked into this a while ago as I ported a small PostgreSQL database
      to DB2. All the user passwords were MD5-hashed, and in the end I
      rolled my own Java function as I couldn't find any built-in way of
      doing the same.

      Cheers

      Michael

      Comment

      • Serman D.

        #4
        Re: Hash/digest function

        On Feb 19, 11:50 pm, Troels Arvin <tro...@arvin.d kwrote:
        I'm looking for a built-in hashing/digest function in DB2, e.g.MD5or
        SHA1.
        Serge Rielau proposes a HASH function in this post:



        You could download the source for a MD5 algorithm and use that instead
        of the HASH function, following the above example. There's an open-
        source implementation in C of the MD5 algorithm in the GNU coreutils
        package:



        --
        Serman D.

        Comment

        Working...