How to add a password to an existing private key in Java
<p>Say I have a previously created private key using openssl, but I've decided not to protect it with a passphrase:</p>

<pre><code>-----BEGIN RSA PRIVATE KEY-----
BASE64 ENCODED DATA
-----END RSA PRIVATE KEY-----
</code></pre>

<p>But then I realised that I want to protect it.</p>

<p>I know how to protect it using openssl, but I have a requirement to do it in Java. Is it possible ?</p>