title: Generate a SecretKey from a password and get a password in cleartext from that Key
body: <p>I do the following to store a SecretKey based on a user password in the KeyStore:</p>
  
  <pre class="lang-java prettyprint-override"><code>// load KeyStore
  
  static byte[] salt = // for learning purposes
                       { (byte) 0xc7, (byte) 0x73, (byte) 0x21, (byte) 0x8c,
                         (byte) 0x7e, (byte) 0xc8, (byte) 0xee, (byte) 0x99 };
  
  String alias = "aeskey";
  char[] password = "password".toCharArray();
  SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
  KeySpec spec = new PBEKeySpec(password, salt, 65536, 256);
  SecretKey tmp = factory.generateSecret(spec);
  SecretKey secret = new SecretKeySpec(tmp.getEncoded(), "AES/CBC/PKCS5Padding");
  Entry aesentry = new KeyStore.SecretKeyEntry(secret);
  store.setEntry(alias, aesentry, protParam);
  </code></pre>
  
  <p>Now I can get the SecretKey from the KeyStore:</p>
  
  <pre><code>KeyStore.SecretKeyEntry e = (SecretKeyEntry) store.getEntry("aeskey", protParam);
  secret = e.getSecretKey();
  </code></pre>
  
  <p>How to get the inital password from that SecretKey?</p>