HMACSHA1 function using the ABL SHA1-DIGEST

Cecil

19+ years progress programming and still learning.
#23
If you are using OpenEdge 11.7.4 you can now do this:

Code:
DEFINE VARIABLE chJSONData AS CHARACTER   NO-UNDO.
DEFINE VARIABLE chKey AS CHARACTER   NO-UNDO.
DEFINE VARIABLE lcLong AS LONGCHAR   NO-UNDO.

chJSONData = '{data:"somedatahere"}'.
chKey      = "ApplicationKey"  .

lcLong = HEX-ENCODE(MESSAGE-DIGEST("HMAC-SHA-256" , chJSONData, chKey)).

MESSAGE STRING(chLong).
 
Top