Forum Post: Encryption\decryption Between Java And Progress

  • Thread starter Thread starter runningtom8@gmail.com
  • Start date Start date
Status
Not open for further replies.
R

runningtom8@gmail.com

Guest
We have a need to use cryptography between Java and Progress. In our case, Java encrypts a string and we need Progress to decrypt it. We are not able to do this. Is this can be done? We used the algorithm "AES_CBC_128". Our key was “1234567812345678”. Our IV Value was “1234567812345678”. We used same parameters for both Java encryption Process and Progress encryption process, but these processes are producing different results when used to encrypt the same string. Code used to encrypt Progress is: DEF VAR algo AS CHAR INIT "AES_CBC_128". DEF VAR cipherText AS RAW. DEFINE VARIABLE cRawIV AS CHARACTER NO-UNDO INITIAL "31323334353637383132333435363738". LENGTH(encryptKey) = 16. PUT-BYTES(encryptKey,1) = HEX-DECODE(cRawIV). LENGTH(ivValue) = 16. PUT-BYTES(ivValue,1) = HEX-DECODE(cRawIV). cipherText = ENCRYPT("Test string", encryptKey, ivValue, algo). DEF VAR ax AS INTEGER NO-UNDO. ax = GET-BYTE(cipherText, 1). Display ax. def var junk as char. junk = hex-encode(cipherText). display junk. Any suggestion? Thank you Y

Continue reading...
 
Status
Not open for further replies.
Back
Top