title: Java - Digital signature using private key for sending data to an external web service
body: <p>I need to connect to an external webservice from my Java application running on Tomcat 6. I have an SSL certificate for my domain purchased and installed on my server. Now I need to connect to an external service and use my certificate private key to digitally sign any data going to the service using SHA-256 hash and 128-bit salt length.  How can I use the private key to create this signature?  Can I pick any values for the salt?  Will they be able to decrypt it using my public key from the SSL certificate?</p>
  
  <p>Can I use the <a href="http://www.bouncycastle.org/" rel="nofollow">Bouncy Castle</a> library for this? Any code or tutorials on the subject would be appreciated.</p>