Home
Analytics
MD5 hash in Before Factory
MikeyD
Hello,
When I open a report (in Before Factory) I read a string from a cookie and compare that string with a parameter in the URL. This all works fine, but now the string in the cookie became an MD5 hash.
I have tried several things, but can't find the way to create an MD5 hash from the URL parameter value. I need this so I can compare both MD5 hash values to see if they are the same.
Could someone please give me an example on how to create an MD5 hash in the Before Factory?
Thanks for your support.
Kind regards,
Mikey.
Find more posts tagged with
Comments
mwilliams
Hi Mikey,<br />
<br />
I haven't done this before. If you're already accessing the parameter value, maybe the following link will help you to create the MD5 value of the parameter. Let me know.<br />
<br />
<a class='bbc_url' href='
http://www.webtoolkit.info/javascript-md5.html'>Javascript
MD5</a>
MikeyD
Hi Michael,
Thanks for your reply.
Do you know a way to save the function in a file (i.e. md5.js) and "include" the function within the Before Factory script. This would avoid having to add the function to all reports.
Kind regards,
Mikey
mwilliams
Mikey,
If you click on your report design (not on any element) and then go to the property editor, you should see a section called resources. You can include jar and javascript files as resources there.
Hope this helps.
MikeyD
Works like a charm!!
Thanks for your help.
Mikey
mwilliams
No problem, glad to help!
MikeyD
Hi,<br />
<br />
I have added the result of this to DevShare:<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/birt-report-designers/1012-increase-security-on-birt-reports/'>Increase
security on BIRT reports - Designs & Code - BIRT Exchange</a>
mwilliams
Great! Thanks for the contribution!
rahul09059
For me its shows Reference Error:md5 is not defined