I was trying to encrypt a message using XSS4j.I have certain issues.As for Encryption we are supposed to use Public Key of client to genrate and encrypt the symmetric key which will be used for final Enbcryption.I am trying to use the same but my doubt is how to create a symmetric key and how to encrypt it using public key.
Actually some how I coded and it is encrypting hte message also but it is throwing Null pointer Exception i.e "Key is not specified or obtained."
When I explored it further I guess it is creating this problem while resolvinfg Key.I dont have any idea how to Resolve the Key without using KeyStoreKeyInfoResolver.As My public is not being store in Key Store.I am getign this key fromCertificate sent by client.