Search found 7 matches

by hmauricio
Mon Jul 04, 2022 10:55 am
Forum: RPG IV
Topic: Encode Base64 doesn't return the correct value
Replies: 13
Views: 17086

Re: Encode Base64 doesn't return the correct value

jonboy49 wrote: Fri Jul 01, 2022 5:36 pm The signature length is being returned to by Qc3CalculateSignature. Any reason you cannot use that ?
Hello,
that was the problem, it's ok now.

Thank you so much for your help.

Best regards
by hmauricio
Fri Jul 01, 2022 5:15 pm
Forum: RPG IV
Topic: Encode Base64 doesn't return the correct value
Replies: 13
Views: 17086

Re: Encode Base64 doesn't return the correct value

Well Scott, i tried as you said, remove the %Trim, but the problem now is that now we've the blanks of the signature field on the encoded field as you can se, and besides that the encoded isnt correct either, the last characters should be UA= and not UB and then followed by all the blanks . Encoded ...
by hmauricio
Fri Jul 01, 2022 5:04 pm
Forum: RPG IV
Topic: Encode Base64 doesn't return the correct value
Replies: 13
Views: 17086

Re: Encode Base64 doesn't return the correct value

Thanks Scott,
i'll try that and get back to you.


Best regards
by hmauricio
Fri Jul 01, 2022 4:46 pm
Forum: RPG IV
Topic: Encode Base64 doesn't return the correct value
Replies: 13
Views: 17086

Re: Encode Base64 doesn't return the correct value

For better undeestanding of what i'm doing, this is the full code. //------------------------------------------------ CTL-Opt Option(*NoDebugIO: *SRCSTMT); CTL-Opt DFTACTGRP(*NO); // CTL-Opt BNDDIR('QC2LE'); CTL-Opt BNDDIR('BASE64'); //------------------------------------------------ // E N T R Y P ...
by hmauricio
Fri Jul 01, 2022 4:29 pm
Forum: RPG IV
Topic: Encode Base64 doesn't return the correct value
Replies: 13
Views: 17086

Re: Encode Base64 doesn't return the correct value

The call : base64_encode(%addr(signature) : %len(%trimr(signature)) : %addr(hashg) : %size(hashg)); Variables definition: dcl-s signature char(512) ccsid(*hex); Dcl-S hashg Char(2732) inz(' '); The variable "Signature" is the result of the API Qc3CalculateSignature( StringHash : %len(strin...
by hmauricio
Fri Jul 01, 2022 4:10 pm
Forum: RPG IV
Topic: Encode Base64 doesn't return the correct value
Replies: 13
Views: 17086

Re: Encode Base64 doesn't return the correct value

Hello Scott, i've a program that receives a string to be encoded, it call's the Qc3CalculateSignature API and sends that string to calculate the signature, then with the received signature i'm calling your service program to encode to Base64. This is the string received that as to be encripted, this...
by hmauricio
Fri Jul 01, 2022 3:21 pm
Forum: RPG IV
Topic: Encode Base64 doesn't return the correct value
Replies: 13
Views: 17086

Encode Base64 doesn't return the correct value

Hello Scott, i'm using your encode/decode service program to encode a signature returned from the Qc3CalculateSignature API, this is for generate an Hash for tax purposes, what's happening is that sometimes the returned encoded value is not correct. I'm enconding the *Hex variable returned from the ...