× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm using Qc3CalculateHash to calculate an MD5 Hash. The sample program
uses QDCXLATE to translate from EBCDIC to ASCII, then uses CVTHC to convert
the hash to hex to DSPLY.

The website that I'm talking to gives an example to try and calculate:

The "Salt" value is mJpSl0hTtf71gdV6kAdf

The value to hash is HCO-LAKEW-938^123456^1424480303^12.24^USD

So I try to hash
mJpSl0hTtf71gdV6kAdfHCO-LAKEW-938^123456^1424480303^12.24^USD

I get this:

FAC0532F9A64B2C672571473750A4EA1105CD386

The web example gets this:

3cae2d6436cc7c8fcd43c9e98506056b

Here is their sample code

HMAC-MD5(transaction-key, "x_login^x_fp_sequence^x_fp_
timestamp^x_amount^x_currency_code")

This website gets a different result!
http://www.miraclesalad.com/webtools/md5.php
297f86eb7a335339ddef7194e70d4f27

I've tried the other hash types for the API, none of them match.

Code used here.....

http://www.mysamplecode.com/2011/05/rpgle-generate-sha-1-hash-use.html

Any ideas what I'm doing wrong?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.