Posts

Showing posts from May, 2014

Implementing PGP (Pretty Good Privacy) using Bouncy Castle Crypto APIs

I was just exploring the Java API's for encrypting and decrypting the file using PGP (Pretty Good Privacy), and I came across Bouncy Castle Crypto APIs. Here we will simply see how to use the Bouncy Castle APIs. Firstly download the cypto jar from the bouncy castle site, you can find the links in the end. 1.        Extract the Jar “crypto-145” at   2.      The java classes are at location “.crypto-145\src\org\bouncycastle\openpgp\examples” Use the jar’s at “crypto-145\jars” as per your SDK:- I have used bcpg-jdk16-145.jar and bcprov-jdk16-145.jar You need to first compile the JAVA classes. Lets create the public and private key:- 1. We will use  RSAKeyPairGenerator.java java class to generate the key’s         java org . bouncycastle . openpgp . examples . RSAKeyPairGenerator charlie "open sesame"    ---where            --  Charlie is identity         -- “ open sesame ” is passName Example: java -cp "D:\pgp\crypto-145\crypto-145\

Dynamic Routing in OSB

Image
In this post we will see how to use OSB dynamic routing feature to Route Request to different proxy/business service at run time.  To demonstrate how Dynamic Routing works, we will first create two proxy service with Mocked response indicating which proxy service got called. We will have customer creation service, which creates the customer either in CRMOD or OCH based on the parameter passed in request. There will be 3 proxy services: 1.      OCH proxy service : a.       URI : /proxy/ ochCreateCustomer This proxy will return the mocked response i.e. “customer created in OCH” 2.      CRMOD proxy service: a.       URI : /proxy/ crmodCreateCustomer This proxy will return the mocked response i.e. “customer created in CRMOD” 3.      Create Customer Orchestration service: a.       URI: /proxy/ createCustomer This proxy receives request in any XML format, with the parameter indication where customer must be created.   The