title: Want to create a key for the AES encryption
body: <p>I want to create a key for use in AES encryption.   I found a way to do this using Java's keytool.  The trick was to specify that the type of the keystore was JCEKS, not the default JCE.</p>
  
  <p>So this command will create the key:</p>
  
  <pre><code>keytool -genseckey -alias aestest  -keyalg AES -keysize 192  -storetype JCEKS
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li><p>how in the heck do I get that generated key out of the keystore, and into a file so I can use it!?</p></li>
  <li><p>are there any special properties that an AES key must have, or can I choose any arbitrary 192 bits as my AES key, thus avoiding needing to use keytool at all?</p></li>
  </ol>
  
  <p>Thanks
  Peter</p>