title: How do I use scrypt to encrypt a private key with a password
body: <p>how do I encrypt a private key created using the <code>KeyPairGenerator</code> in java with scrypt? I want to secure the private key using a password, so no one can use the private key to decrypt the data I encrypted even if he has the private key and the data.
  (I'd use the BouncyCastle API, if you don't propose any other)</p>
  
  <p>Thanks</p>