|
Hi All,
How are you?
I am facing the following issue with Qc3CalculateHMAC API.
Currently i am trying to do the JWT token validation in iSeries, to do that
i am planning to generate the HMAC using the header, payload and signed
secret key.
The logic i am using is Passing the input data as
Header(Base64encoded).Payload(Base64encoded).
1) For Base64 decoding - SYSTOOLS.BASE64ENCODE function is used.
2) Algorithm - SHA256.
3) I am passing the Secret Key as plain character text using "KEYD0200"
But the HMAC generated by the API is not correct. Am i doing anything wrong?
Qc3CalculateHMAC(
%addr(headerPayload) :
%len(%trimr(headerPayload)) :
'DATA0100' :
algd0500 :
'ALGD0500' :
keyparam :
'KEYD0200' :
'0' : // crypto
*blank : // crypto dev
hash :
QUSEC);
Could anyone please help me to figure out the issue?
Regards,
Suren K
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.