Topics In Demand
Notification
New

No notification found.

Blog
Same encryption Java code outputs undecryptable content in SAP PI but decryptable in Eclipse

December 26, 2017

BPM

1296

0

Issue

I am using Bouncy Castle java to encrypt files using PGP. The program is meant to run into SAP PI 7.0. When I run PI’s output (encrypted file) against the decryption program, I get an empty decrypted file with no error.

So, I tried to encrypt the same source file in Eclipse, using the same parameters. This time, I was able to decrypt the output correctly to retrieve my original file. Same code, same input.

At some point, I noticed that SAP PI Training output is a few bytes shorter (usually 32 bytes) than Eclipse’s output. I think that’s the reason why the decryption output is empty without error. I have no idea what might be missing in the encrypted file as both PGP message have the same shape.

Any suggestion on how I can fix it? Is there a part of the PGP message that is missing? Do I miss a library or a configuration point in PI environment?

Technical details

Bouncy Castle

Local environment

  • Java: 1.6.0_45
  • Operating System: Windows 7 SP1
  • JDK version: 1.3

SAP PI environment

  • PI version: 7.0
  • Java Runtime: Java(TM) 2 Runtime Environment, Standard Edition (version=1.4.2_14-b05)
  • Java Virtual Machine : Java HotSpot(TM) 64-Bit Server VM (version=1.4.2_14-b05)
  • Operation System: Windows 2003 (version=5.2, arch=amd64)
  • JDK version: 1.3


That the contents of third-party articles/blogs published here on the website, and the interpretation of all information in the article/blogs such as data, maps, numbers, opinions etc. displayed in the article/blogs and views or the opinions expressed within the content are solely of the author's; and do not reflect the opinions and beliefs of NASSCOM or its affiliates in any manner. NASSCOM does not take any liability w.r.t. content in any manner and will not be liable in any manner whatsoever for any kind of liability arising out of any act, error or omission. The contents of third-party article/blogs published, are provided solely as convenience; and the presence of these articles/blogs should not, under any circumstances, be considered as an endorsement of the contents by NASSCOM in any manner; and if you chose to access these articles/blogs , you do so at your own risk.


© Copyright nasscom. All Rights Reserved.