|
Hi
Look at this api
Qc3CalculateHMAC
I hope this helps
This is what we used in a service program I wrote MANY moons ago
It took me a while to sort this out - and Im sorry to say, but I cannot remember who - but someone from this list proved invaluable in helping me sort this out
This is the code
monitor;
Qc3CalculateHMAC( ConvdataToHash
: DataLen
: 'DATA0100'
: SHA_256
: 'ALGD0500'
: my_key
: 'KEYD0200'
: '0'
: *blanks
: binaryHMAC
: ErrorCode );
on-error;
HldErrorcode = ErrorCode;
endmon;
d ConvdataToHash...
d s 500a
D DataLen s 10i 0
d SHA_256 c const(3)
d binaryHMAC...
D s 32765
D my_key DS qualified
D Type 10i 0 inz(SHA_256)
D Len 10i 0
D Fmt 1a inz('0')
D 3a
D Value 92a
D ErrorCode DS qualified
D bytesProv 10i 0 inz(0)
D bytesAvail 10i 0 inz(0)
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
‘If you're going through hell, keep going.’
Winston Churchill
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of p.caroti@xxxxxxxx
Sent: Friday, August 17, 2018 9:58 AM
To: midrange-l@xxxxxxxxxxxx
Subject: [EXTERNAL] Program to Calculate Hash using SHA-256 of a file
Hi all
I'm looking for an example how to calculate Hash using SHA-256 . be patient for my request : this should be run on V5R2m0 (it would be possible)
I found this old link
https://www.experts-exchange.com/questions/20502110/Need-to-call-MD5-algorit
hm-from-RPGLE.html, but i don't know how to (if possible) adapt to SHA-256
Thanks in in advance
---
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
--
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: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
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.