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

I found the following from Carsten
I have not had time to look into but I wonder if they might help with a RPGLE decrypt.


This SQL looks promising

Happy reading...

Bryan Dietz

On Nov 13, 2017, at 5:20 PM, Dan <dan27649@xxxxxxxxx> wrote:

I have a requirement to accept an encrypted credit card number from our
Oracle system, decrypt it on our Power i so that we can then send it to
Curbstone for payment processing.

Our Oracle developer gave me the following C# code that will decrypt the

private byte[] SALT = Encoding.Unicode.GetBytes("<32 bytes removed>";

public string decryptText(string encText, string password)


byte[] cipher = Convert.FromBase64String(encText);
Rfc2898DeriveBytes bytes = new Rfc2898DeriveBytes(password, SALT),
1000); Rijndael rijndael = Rijndael.Create();

rijndael.BlockSize = 256;

rijndael.Key = bytes.GetBytes(32);

rijndael.IV = bytes.GetBytes(32);
MemoryStream memoryStream = new MemoryStream();

CryptoStream chiperStream = new CryptoStream(memoryStream,
rijndael.CreateDecryptor(), CryptoStreamMode.Write);

chiperStream.Write(cipher, 0, cipher.Length);


return Encoding.Unicode.GetString(memoryStream.ToArray());


We are on v7r1, cume C6320710 (level 16320), TR level 11. SF99123 level 3.
Display Installed Licensed Programs does not show 5733OPS installed; the
only 5733* LPs I see are:
Licensed Installed
Program Status Description
5733SC1 *INSTALLED IBM Portable Utilities for i
5733SC1 *INSTALLED OpenSSH, OpenSSL, zlib
5733W60 *INSTALLED WebSphere Application Server for OS/400 V6
5733W60 *INSTALLED WebSphere Application Server V6 Express

Is C# supported in the IBM OSS? If not, is the code posted above easily
portable to a language that IBM OSS does support? I guess I'll ask the
stupid question, is this something that could be accomplished in RPG, using
QC2LE functions or any other system supplied functions? FYI, we are moving
to v7r3 eventually, but this solution is required long before that will

- Dan
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/opensource.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2023 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.