|
Just to clarify, by same result you mean sqlcode = -171?
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Rishi Seth
Sent: Monday, September 23, 2019 10:20 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Regarding Decryption of AES128 encrypted data in RPGLE and
query regarding CRC 32
CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know
the content is safe.
tried below still the same result:-
denc s 50
dpsw s 31 inz('6-9d15-ec98bcc81ec4275OIM1TS
D ')
Dtext s 13
c eval text = 'whatever text'
/free
exec SQL Set :enc = encrypt_AES(:text,:psw);
DSPLY SQLCODE;
DSPLY enc;
eval *inlr=*on;
On Mon, Sep 23, 2019 at 4:11 PM Rob Berendt <rob@xxxxxxxxx> wrote:
Number three below is probably the biggest culprit. I'll give you thewrote:
rest as stuff you messed up on in copy/paste to obfuscate the code.
One, You never defined the variable TEXT.
Two, you forgot a semicolon at the end of
Text = 'Whatever Text'
Three you forgot the colon in front of Text and PassWord in
Encrypt_AES(Text, PassWord).
Four you forgot the semicolon at the end of inz('yourPassWord')
Change this:
DCL-S Encrypted VarChar(256);
DCL-S Password VarChar(15) inz('yourPassWord')
Text = 'Whatever Text'
Exec SQL Set :Encrypted = Encrypt_AES(Text, PassWord);
EVAL *INLR=*ON;
To:
**free
DCL-S Encrypted VarChar(52); // I only changed this to 52 to test
using DSPLY DCL-S Password VarChar(15) inz('yourPassWord'); DCL-S
Text VarChar(80);
Text = 'Whatever Text';
Exec SQL Set :Encrypted = Encrypt_AES(:Text, :PassWord);
Dsply SQLCODE;
Dsply Encrypted;
*inlr = *on;
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Rishi Seth
Sent: Monday, September 23, 2019 3:44 AM
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Regarding Decryption of AES128 encrypted data in RPGLE
and query regarding CRC 32
CAUTION: This email originated from outside of the organization. Do
not click links or open attachments unless you recognize the sender
and know the content is safe.
Tried this code but it's not working and giving below errors while
compilation itself.
**free
DCL-S Encrypted VarChar(256);
DCL-S Password VarChar(15) inz('yourPassWord')
Text = 'Whatever Text'
Exec SQL Set :Encrypted = Encrypt_AES(Text, PassWord);
EVAL *INLR=*ON;
*********
M e s s a g e S u m m a r y
Msg id Sv Number Message text
RNF0607 00 1 Text is skipped to recover from the previous error.
RNF7031 00 36 The name or indicator is not referenced.
RNF0312 20 1 A right parenthesis is expected but is not found.
RNF0633 20 1 An unexpected right parenthesis was encountered; right
parenthesis is ignored.
RNF3308 20 10 Keyword name is not valid; the keyword is ignored.
* * * * * E N D O F M E S S A G E S U M M A R Y * * * * *
On Mon, Sep 23, 2019 at 8:14 AM Rishi Seth <rishiseth99@xxxxxxxxx>
request
So similarly will it work för decryption?is
On Fri, Sep 20, 2019, 18:10 Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx>
wrote:
Dear Rishi,
do you read the answers you get?
I send you already yesterday the SQL Solution.
Here again the (embedded) SQL Source code (and don't forget to
change your source attribute to SQLRPGLE)
DCL-S Text VarChar(20);
DCL-S Encrypted VarChar(256);
DCL-S Password VarChar(15) inz('yourPassWord')
Text = 'Whatever Text'
Exec SQL Set :Encrypted = Encrypt_AES(Text, PassWord);
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars."
(Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not
training them and keeping them!"
„Train people well enough so they can leave, treat them well enough
so they don't want to.“ (Richard Branson)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf
Of Rishi Seth
Sent: Freitag, 20. September 2019 15:11
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Regarding Decryption of AES128 encrypted data in RPGLE
and query regarding CRC 32
c/exec sql
c+ Declare c1 scroll cursor for
c+ select encrypt ('abcde','k1',1)
c+ FROM lib1/FL1
C/END-EXEC
Message ID . . . . . . : SQL0104 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Message . . . . : Token ,1 was not valid. Valid tokens: ) ,.
Cause . . . . . : A syntax error was detected at token ,1. Token ,1
not
a valid token. A partial list of valid tokens is ) ,. This list
assumes
that the statement is correct up to the token. The error may be
earlier in
the statement, but the syntax of the statement appears to be
valid up to
this point.
Recovery . . . : Do one or more of the following and try the
clauses.again:
-- Verify the SQL statement in the area of the token ,1.
Correct the
statement. The error could be a missing comma or quotation mark,
it could
be a misspelled word, or it could be related to the order of
--function.
-- If the error token is <END-OF-STATEMENT>, correct the SQL
statement
because it does not end with a valid clause.
On Fri, Sep 20, 2019 at 1:35 PM Rob Berendt <rob@xxxxxxxxx> wrote:
Let me find you a more applicable link:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/db2/rbaf
zs cal e.htm Look up the various encrypt/decrypt functions there.
First of all, you are trying to use a SQL function, NOT a RPG
returning it to RPG.So you have to use "imbedded sql".
If you know nothing about imbedded SQL in RPG you are probably
better off asking on the RPG list. They should be able to give
you a couple of RTFM links.
There is probably a way to do the encrypt/decrypt outside of RPG.
One method which comes to mind is to build an index or view over
the file which does the encrypting/decrypting for you before
wrote:previously.
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept
1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On
Behalf Of Rishi Seth
Sent: Thursday, September 19, 2019 11:41 PM
To: Midrange Systems Technical Discussion
<midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Regarding Decryption of AES128 encrypted data in
RPGLE and query regarding CRC 32
CAUTION: This email originated from outside of the organization.
Do not click links or open attachments unless you recognize the
sender and know the content is safe.
I äm trying to use it as it's advised on below link but so far
have been unable to encrypt key in below program due to error
mentioned
wrote:
https://www.ibm.com/support/knowledgecenter/en/SSULQD_7.1.0/com.i
bm .nz .sqltk.doc/r_sqlext_encrypt_decrypt.html
Thanks.
On Friday, September 20, 2019, Rishi Seth <rishiseth99@xxxxxxxxx>
But i need to encrypt it that is why function is used.
On Friday, September 20, 2019, Sam_L <lennon_s_j@xxxxxxxxxxx>
inz('16-9d15-ec98bcc81ec4275OI
This compiles except for the error "The name or indicator
ENCRYPT is not defined. "
dt1 s 50 inz('abcde')
dt2 s 50
dk s 50
thisM1TI')
d************* I')
C EVAL T2= ENCRYPT(t1:k:1)
C T2 DSPLY
C EVAL *INLR=*ON
Sam
On 9/19/2019 3:19 PM, Rishi Seth wrote:
Hi,
It's RPGLE program now after putting colons it's giving error
of
'**RNF7503
30 1 Expression contains an operand that is not defined.'
--error--
--is at below code's line no. 6*
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email:
MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription
related questions.
Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email:
MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email:
MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
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.