Generate a constant DESede secret key with messagedigest
<p>When I execute the following code, error will occur java.security.InvalidKeyException: Invalid key length: 20 bytes.</p>

<pre><code>// Initialize constant symmetric key
String constant = "ConstantPassword";
MessageDigest hash = MessageDigest.getInstance("SHA-1");
byte[] bHash = hash.digest(constant.getBytes());
SecretKey cSymmetricKey = new SecretKeySpec(bHash, "DESede");

// Encryption phase
cipher = Cipher.getInstance("DESede");
cipher.init(Cipher.ENCRYPT_MODE, cSymmetricKey);
byte[] output = cipher.doFinal(data.getEncoded());
</code></pre>

<p>I understand that the recommended DESede key is 21 bytes. <br />
I realize there isn't any algorithm that will give me a 21 byte output according to <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html#MessageDigest" rel="nofollow">this</a>.<br />
Is there any other way ?</p>
