I have developed one PGP encryption module for receiver File adapter and it is working fine. Now I have a requirement where, instead of passing my passphrases(keystore and private key passowrd) inside the Communication channel i have to store my Keystore passphrase and Private keys passphrase in an XML file at some location on the PI server and the value inside those XML tags (<PriavetKeyPassword> and <KeystorePassphrase>) needs to be hashed (like ee223323sdfsad313) .
During configuration(ID-> CC->Modletab) i have to pass the location of this XML file and at runtime, inside the adapter module both the hashed passphrases should be read from the location(on PI server) where the XML file is placed and dynamically retrieve the original value from those hash values and then use within the module.
Reading of a XML file is fine (developed one java application for the same) and its working fine. Will also try to implement in the module.
But my doubt is in hashing part, which algorithm do i need to use:
1) do i need to do hashing using simple function hashCode(hashCode() ) or should go for MD5 hashing algorithm.
2) How do i will retrieve this hashing value at runtime inside the module code and give its original value inside the method which will encrypt the file after gettig these phassphrases.
As per my knowledge, If i am using HashMap then i have to maintain some key value pair which i dont want and if use MD5 then hashing will be done but how to retieve value(not sure for this part).
Request you all to help..
Edited by: AmitSri on May 6, 2010 4:14 PM