I took a hex dump and analysing hex dump, was good idea. It simplified lot of things. I took, unload of encrypted data in an file. And then from byte patterns and using simple read() and seek(), i was able to extract the actual encrypted data bytes as i intended to do. Thank you for your inputs :) . have a nice day