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



Three things to check on parameter one: data type, length, value. According to the manual the data type
encrypted-data
An expression that must be a string expression that returns a complete, encrypted data value of a CHAR FOR BIT DATA, VARCHAR FOR BIT DATA, BINARY, VARBINARY, or BLOB built-in data type. The data string must have been encrypted using the ENCRYPT_AES, ENCRYPT_RC2, or ENCRYPT_TDES function.
Not sure what the RPG types are for these two sql types: CHAR FOR BIT DATA, VARCHAR FOR BIT DATA
I'm sure the "for bit data" is pretty important. It's not the default.
The manual doesn't seem to specify the length.

If the data type and the length are not the issue then the issue may be the value of parameter one. Let me give you an example. Notice how the manual specifies ENCRYPT_AES, ENCRYPT_RC2, ENCRYPT_TDES but the manual does not specify that on the DECRYPT*functions? Let's assume that the first x characters of the encrypted data indicate which method of decryption should be used: AES, RC2, TDES. Perhaps your encryption matches none of the above? I do not have the inclination to read the link provided to see how your encryption was done. Not my day job... Only working on this to learn more about encryption and just because I'm a nice guy.

Maybe there are additional messages in the joblog which will help determine if it is the data type, the length or the value.
Or some RPG-SQL experts may chime in about sql to rpg data typing, especially the 'for bit data' stuff.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.