I have written a program which encrypts data using a RSA public key from a JKS keystore and then decrypts the data using the corresponding RSA private key.
1 have also written a program which generates a signature using a DSA private key from a JKS keystore and then varifies it using the corresponding public key.
But the problem is if I combine the two activities in a single program how do I selectively identify the signature and decrypt it ?