×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Larry,

Are you converting the string 'abc' to ASCII before running the hash? It is
likely that the eCommerce application is using the ASCII character set and
the System I uses the EBCDIC character set. You can use the QDCXLATE or
ICONV APIs to do the character conversion.

Patrick


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Larry Dyer
Sent: Tuesday, July 15, 2008 8:12 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Sha1 Conversion

Hello,

I am trying to create an RPG program to create an SHA-1 Hash to be used in
an Ecommerce application. I am using the API QC3CalHa to create the hash
value. I am successful in generating the 20 byte message digest (which is
in an unreadable format). However, I am unable to properly convert the
generated hashvalue to the proper format to be used in my webapp. I have a
test string that I was given with the expected results. The test string
'abc' should return the string
"a9993e364706816aba3e25717850c26c9cd0d89d". However, my program is
returning
"80ADD764A3B1057058473DC9FCC7B461DDD62749".

My problem is 1) I am unsure how to verify the message digest (hash)
created by QC3CALHA is correct? and 2) how to I successfully convert the
generated message digest into the correct format?

Any help would be greatly appreciated.




Larry Dyer
Lead Systems Analyst
Texas Engineering Extension Service
979 458-6871
Larry.Dyer@xxxxxxxxxxxxxxxxx


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.