Hi Danny,
Hi MarkD,
Thank you
I tried your approach but still not working.
I provide you exactly my example:
Client
Code: Select all
#myString := 'hello'
#encrypted := #myString.Encrypt( '1jd7RME984jnBGol' )
Where #myString is a #STD_STRING, and the encrypted string computed has value: 'D70FE402154340B5'
Then, in the Server side ( MarkD the Builtin function is running on IBM i )
Code: Select all
Use Builtin(DECRYPT) With_Args(#encrypted (#encrypted.CurChars / 2) '1jd7RME984jnBGol' YES) To_Get(#decrypted #RETCODE)
The decrypted value is: ']R4Ù¦ÝÉ' . Not at all my starting string.
I also tried to encrypt and decrypt the string ('hello') with the builtin function only (Server-side):
Code: Select all
#myString := 'hello'
Use Builtin(ENCRYPT) With_Args(#myString (8) '1jd7RME984jnBGol' YES) To_Get(#crypted #RETCODE)
Use Builtin(DECRYPT) With_Args(#crypted (#crypted.CurChars / 2) '1jd7RME984jnBGol' YES) To_Get(#decrypted #RETCODE)
Crypted value: '5411CB87F874B0F6'
Decrypted valude: 'hello'
As we can see, in this second example the crypted value doesn't match at all with the client-side crypted value.
Someone of you has other suggestions for me?
Thanks
Andrea