By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,589 Members | 2,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,589 IT Pros & Developers. It's quick & easy.

Hash/digest function

P: n/a
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 <tr****@arvin.dk>
http://troels.arvin.dk/
Feb 19 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Feb 20, 12:50 am, Troels Arvin <tro...@arvin.dkwrote:
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:

http://www-128.ibm.com/developerwork...-0407tessarek/

haven't tried it
/Lennart

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

Feb 20 '07 #2

P: n/a
On 19 Feb, 22:50, Troels Arvin <tro...@arvin.dkwrote:
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

Feb 22 '07 #3

P: n/a
On Feb 19, 11:50 pm, Troels Arvin <tro...@arvin.dkwrote:
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:

http://groups.google.com/group/comp....501fab70796eae

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:

http://www.gnu.org/software/coreutils/

--
Serman D.

Feb 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.