[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: PHP and Progress 4GL

Status
Not open for further replies.
W

wsartorelli

Guest
My code is: DEF VAR apiSecret AS CHAR NO-UNDO. DEF VAR stringtosign AS CHAR NO-UNDO. DEF VAR secretKey AS MEMPTR NO-UNDO. DEF VAR c_signature AS LONGCHAR NO-UNDO. ASSIGN apiid = "b4t5yug1q6du" apisecret = "UJe7NicGijgkTSKByC+/B86NDafeGYGDXsxJKiLKH8LE9ni5whmTdof6QgR6vGXonn0htVOLsRXRcpEg4QPWSA==". ASSIGN dat_ref = 'x-csod-date:2018-06-28T13:37:35.000'. ASSIGN httpMethod = 'POST' apiKey = 'x-csod-api-key:' + apiId httpUrl = '/services/api/sts/session'. stringToSign = httpMethod + "\n" + apiKey + "\n" + dat_ref + "\n" + httpUrl. ASSIGN secretKey = base64-DECODE(apiSecret). ASSIGN c_signature = BASE64-ENCODE (MESSAGE-DIGEST('SHA-512', stringToSign, secretKey)). The result of the c_signature variable is different if I put the same code in PHP. Why ?

Continue reading...
 
Status
Not open for further replies.
Top