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



The reference below on the rpgiv.com doesn't come up because the rpgiv.com
server is apparently dead in the water. It is probably another one of those
wonderful Atlanta weather patterns knocking out the power again.
It'll be back up ASAP.

-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Haas, Matt
Sent: Tuesday, March 22, 2005 12:29 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Qc3EncryptData and Qc3DecryptData Api Help

Rick,

That error message means that the cipher you're trying to use isn't
available (take a look at
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qc3enc
dt.htm for the error messages). If you go to
http://www.rpgiv.com/rpgivforum/view?SID=20041118023842270824, you'll find
an example of a program that lists out the available ciphers for your
system.

If you're willing to use AES, I posted code last year
(http://www.rpgiv.com/rpgivforum/view?SID=20041118023842270824 -- the key
length is wrong in the example, it should be 16 characters and use
KEYOPT_16BYTE for KeyOption). That example only does 32 bytes max but I can
post an example that does more if you're interested.

Also, you need to make sure that the receiver variable is big enough to hold
the results of the encryption since some ciphers add padding. For example,
AES always returns multiples of 32 bytes.

Matt

-----Original Message-----
From: rpg400-l-bounces+matt.haas=thomson.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+matt.haas=thomson.com@xxxxxxxxxxxx]On Behalf Of
Rick DuVall
Sent: Tuesday, March 22, 2005 12:12 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Qc3EncryptData and Qc3DecryptData Api Help


Hi Folks,

        I have been attempting to use the Qc3EncryptData and Qc3DecryptData
Apis.
Using the following Prototypes

D TripleDESEnc    PR                  extproc('Qc3EncryptData')
D  DataToEncrypt                  *
D  LengthOfData                 10I 0
D  DataFormatNam                 8A
D  AlgoDescriptn                  *
D  AlgoDescName                  8A
D  KeyDescriptn                   *
D  KeyDescName                   8A
D  Provider                      1A
D  CryptoDevNam                 10A
D  EncryptedData                  *
D  EncryptedLen                 10I 0
D  DataLenRetd                  10I 0
D  ErrorCode                          Like(ErrorParm)
and
D TripleDESDec    PR                  extproc('Qc3DecryptData')
D  DataToDecrypt                  *
D  LengthOfData                 10I 0
D  DataFormatNam                 8A
D  AlgoDescriptn                  *
D  AlgoDescName                  8A
D  KeyDescriptn                   *
D  KeyDescName                   8A
D  Provider                      1A
D  CryptoDevNam                 10A
D  DecryptedData                  *
D  DecryptedLen                 10I 0
D  DataLenRetd                  10I 0
D  ErrorCode                          Like(ErrorParm)


Where The AlgoDescName = ALGD0200 and is defined as
D Algd0200        DS
D  BlockCyphAlg                 10I 0  Inz(21)
D  BlockLength                  10I 0  Inz(8)
D  AlgoMode                      1A    Inz('1')
D  AlgoPadOption                 1A    Inz('0')
D  AlgoPadChar                   1A    Inz(X'00')
D  AlgoReserved                  1A
D  MacLength                    10I 0  Inz(0)
D  EffKeySize                   10I 0  Inz(0)
D  InitVector                   32A

and the KeyDescName = KeyD0200 and is defined as
D Keyd0200        DS
D  KeyType                      10I 0  Inz(21)
D  KeyStringLen                 10I 0  Inz(128)
D  KeyFormat                     1A    Inz('0')
D  KeyReserved                   3A
D  KeyString                      *    Inz(%Addr(MyKeyString))

I am trying to do triple-des with dataformatname = 'DATA0100'.

With The Following Result : CPF9DDE

Does anybody have a hint/direction/pointer?  Would the rest of my code help?
(it doesn't help me yet<g>)



Thanks


Rick DuVall
Systems Manager
Dealer's Auto Auction of Okc
405 947-2886 Ext:143
rick@xxxxxxxxxx


-- 
This is the RPG programming on the AS400 / iSeries (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 AS400 / iSeries (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.