× 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.



If you want to implement HMAC in RPG you could follow this pseudo code:

*function* hmac (key, message)
*if* (length(key) > blocksize)*then*
key = hash(key)/// keys longer than blocksize are shortened/
*end if*
*if* (length(key) < blocksize)*then*
key = key ∥ [0x00 * (blocksize - length(key))]/// keys shorter than blocksize are zero-padded (where /∥/is concatenation)/
*end if*
o_key_pad = [0x5c * blocksize] ⊕ key/// Where blocksize is that of the underlying hash function/
i_key_pad = [0x36 * blocksize] ⊕ key/// Where ⊕ is exclusive or (XOR)/
*return* hash(o_key_pad ∥ hash(i_key_pad ∥ message))/// Where /∥/is concatenation/
*end function*



On 12/30/2015 4:09 PM, Jack Tucky wrote:
I knew my post was long but I thought I put it together properly. The
website name is payeezy.com. Not sure if it's worth posting since you need
a user id/password to use their testing tools.

In my first post i stated that I was using the Qc3CalculateHash and the the
sample code was using the PHP HMAC-MD5, I didn't know that Hmac and MD5
were different.

Thanks for clearing that up. I'll look at the other API


On Tue, Dec 29, 2015 at 4:47 PM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

On Tue, Dec 29, 2015 at 4:36 PM, Kevin Bucknum
<Kevin@xxxxxxxxxxxxxxxxxxx> wrote:
HMAC is not just an MD5 hash. Go to
http://www.freeformatter.com/hmac-generator.html to see a web site that
will match up with the example you are given.
Yes, finally. If he'd just come out and said HMAC from the beginning,
it would have saved a lot of trouble.

And yes, I've confirmed with Python also that the example he's looking
for is an HMAC using the MD5 algorithm, with the "salt" as the key.

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.