× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



That works. Thanks Scott. I'm aware that one hex char only represent 4
bits, which is only half a byte. I though I tried value of 16 before and it
failed. But now it works... sigh...


"Scott Klement" <rpg400-l@xxxxxxxxxxxxxxxx> wrote in message
news:mailman.33160.1276711343.2580.rpg400-l@xxxxxxxxxxxxxxx
Hiya Lim,

You have 16-bytes of input data that you are trying to decrypt. However,
you've told the API that the input length is 32... so who knows what
other data it's receiving and trying to decrypt?

Furthermore, you've told it that the block length is 32. The normal block
length for AES (according to FIPS-197) is 16. So once again, it's reading
32 bytes at a time, when you're only supplying 16 bytes, and trying to
decrypt only 16 bytes.

Perhaps you're confused because you're doing everything in hex, and the
hex representation is a 32-character string? Remember, there are two hex
digits to represent a single byte...

Your data is only 16 bytes long.

So change this:

D algorithmBlockLen...
D 10i 0 inz(16) <-- was 32

And this:

Qc3DecryptData(myEncryptedData :16 <-- was 32

Then you should get the desired result (I've only desk-checked it, I
didn't compile/run it... so who knows if I'm missing something else)

Good luck



On 6/16/2010 12:22 PM, hockchai Lim wrote:
ok. I posted a strip down version of my code in
http://code.midrange.com/f309a463e1.html.



"Dennis Lovelady"<iseries@xxxxxxxxxxxx> wrote in message
news:mailman.33137.1276708405.2580.rpg400-l@xxxxxxxxxxxxxxx
http://code.midrange.com.

Just go there. It's easy.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"All progress is based upon a universal innate desire on the part of
every
organism to live beyond its income."
-- Samuel Butler

Yes. But I'm looks at all my data in Hex not the displayed char.

Does any one know the link to post code?

"Charles Wilt"<charles.wilt@xxxxxxxxx> wrote in message
news:mailman.33124.1276706560.2580.rpg400-l@xxxxxxxxxxxxxxx
Nope, it most certainly applies.

An 'A' in EBCDIC has a different hex value than a 'A' in ASCII.

Charles

On Wed, Jun 16, 2010 at 12:23 PM, hockchai Lim
<lim.hock-chai@xxxxxxxxxxxxxxx> wrote:
The web site say entered hex value, so, I'm thinking ASCII/EBCID does
not
apply in this case. I would expect Qc3DecryptData also dealing all
the
data
in hex (bit).
"Rory Hewitt"<rory.hewitt@xxxxxxxxx> wrote in message
news:mailman.33110.1276704721.2580.rpg400-l@xxxxxxxxxxxxxxx
ASCII vs. EBCID, perhaps - do you need to use iconv() either after
or
before
the data conversion?

On Wed, Jun 16, 2010 at 8:51 AM, hockchai Lim
<lim.hock-chai@xxxxxxxxxxxxxxx
wrote:

I used the Input Data: 59a10915306238b011ba322354c608e6 and AES key
:8181818181818181818181818181818181818181818181818181818181818181.

On the

http://www.unsw.adfa.edu.au/~lpb/src/AEScalc/AEScalc.html<http://www.un
sw.adfa.edu.au/%7Elpb/src/AEScalc/AEScalc.html>site
I get the result of (which is what I expected):
e3c5e2e3404040404040404040404040

But with Qc3DecryptData, I get the result of :
343581ED077DA7C156FB59CC1075D7C0B79BD2778372388ECDF908D54124870E


Any idea where or how I can figure out where I did wrong?



--
This is the RPG programming on the IBM i / System i (RPG400-L)
mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.








As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.