|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MD5 hash and esql |
« View previous topic :: View next topic » |
Author |
Message
|
mqmqmq |
Posted: Mon Nov 23, 2009 4:19 am Post subject: MD5 hash and esql |
|
|
Novice
Joined: 02 Jul 2008 Posts: 22
|
Hi,
Environment: Linux, Broker 6.0.0.9.
Need: Calculate MD5 hash from certain string.
When writing esql, Base64 Decoding and encoding can be done by referring to external java class/function (see below):
CREATE PROCEDURE base64Decode(IN source CHAR)
RETURNS BLOB
LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.javacompute.Base64.decode";
Is it possible to calculate MD5 hash in a similar way? Or is it always necessary to use JavaCompute node? I have googled enough but didn't find any solution how to refer to external java class/function in this case.
Thanks!
BR,
--
mqmqmq |
|
Back to top |
|
 |
gs |
Posted: Mon Nov 23, 2009 5:50 am Post subject: |
|
|
 Master
Joined: 31 May 2007 Posts: 254 Location: Sweden
|
You should be able to create a simple method that makes use of java's built in MD5 functionality.
What's the problem with referring to a java method? |
|
Back to top |
|
 |
mrch1 |
Posted: Sun Nov 29, 2009 7:05 pm Post subject: |
|
|
Newbie
Joined: 29 Nov 2009 Posts: 5
|
i'm doing this in an easy way:
if you're using ORACLE database,create a storedproc called md5,so you can just use the sql "select md5(?) from dual" and passthru the sql you need with a paramvalue of your string to the database,and then it comes out with what you need.
may this be a little help |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|