× 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.



Hello Eftimios,

The credit for the code you're referring to goes to Vengoal Chang who
wrote it - my name appears at the end of the code because of an append
that I made earlier in the thread. As for the problem at hand it seems
that the original code employs the DES algorithm which supports 8 byte
keys, whereas the AES algorithm that you want to use supports 16, 24 and
32 byte keys on the System i. So you'll need to ensure that at least a
16 byte key is provided for your version of the code to work.

As for an example of code using the AES algorithm I'm not sure exactly
what API is giving you a hard time - the subject line refers to the
encryption API while the body text mentions the decryption API.
Hopefully you'll get it working once you correct the key value
parameters though - otherwise let me know.

Best regards,
Carsten Flensburg

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Eftimios
Pantzopoulos
Sent: 8. april 2009 08:05
To: midrange-l@xxxxxxxxxxxx
Subject: CPD9DDD with QC3EncryptData

I've been banging my head against the Qc3DecryptData wall all day trying
to get a call to work. I copied some code placed on Midrange by Carsten
Flensburg some time ago.
(http://archive.midrange.com/rpg400-l/200504/msg00322.html )


I compiled and ran the example in its ILE version and it works ok. Our
security people want us to use AES encryption so I amended the code to
use parameters that reflect the desired AES behaviour. However when I
run the AES version it fails with a CPF9DDD error (CPF9DDD E The key
string length is not valid.) The key and length values are the same in
both versions of the code, so I checked the other parameter values.
The only differences between the parameter values are in the following
list:
Parameter non-AES | AES
Version |
Version
=========================================|======================
QC3BA - Block Cipher Algorithm 20 |
22
QC3BL - Block Length 8 |
16
QC3KT - Key Type 20 |
22

All I can think of is that some other parameter needs changing.

Would really appreciate it if someone has created an AES version of that
code.

This communication is intended only for use by the addressee.It may contain confidential or privilegedinformation.
If you receive this communication unintentionally, please inform us immediately and delete this e-mail and any attachments.
Warning: Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept
responsibility for any loss or damage arising from the use of this email orattachments.


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.