title: why we should write all these steps to generate a key for DES algorithm using java
body: <p>I need to understand why we should write all these steps to generate a key for DES algorithm using java:</p>
  
  <pre><code>DESKeySpec desKeySpec = new DESKeySpec(key);
  SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
  SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
  </code></pre>
  
  <p>can anyone explain?</p>