Generate a Hash MD5 value for form data

Raj Karan
Contributor
January 28, 2014

Hello there,

I am trying to generate hash MD5 value for the data submitted by anonymous user. I have achieved form using "Bob Swift Run Plugin" what I want now is:

It's a online payment system,

1. Form data should get submitted to a web page (of merchant's website).

2. Before submitting this data to a web page I want to calculate hash value for input data and place it in a hidden field.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2014

You could insert javascript into the page and put a click event on the submit button that would calculate the hash and populate the hidden text field and then submit the data. There are javascript libraries that can calculate the MD5 hash of an input string.

Raj Karan
Contributor
January 29, 2014

I am worried about the security issues. The javascript code can be viewed in browser and to calculate MD5 hash i am using a key which supposed to be hidden.

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2014

Ok, then how about using Javascript to send an ajax call to a webservice that will pass back an MD5 hash. Then all of the processing code is server side.

Raj Karan
Contributor
January 30, 2014

Yeah that's my main issue how I can have a server side code. I would prefer to embed some java code inside the confluence instead of having an external scipt.

Previously I was thinking that through Ajax I would send form input to a PHP script and get hash in return, then place that hash value inside a hidden field and then submits the all user input with hash value to the merchant's web page.

But I couldn't find a way to submit the form created by BOB SWIFT RUN PLUGIN to a Web page. I am more used to of PHP and XHTML but here I couldn't find a form tag where I can add Merchant's webpage link (action property).

Please give some suggestions over this.

Warm Regards

Raj karan

TAGS
AUG Leaders

Atlassian Community Events