kwa.init(Cipher.WRAP_MODE, kek);
byte[] kmBytes = new byte[24];
for (int i = 0; i < kmBytes.length; i++)
kmBytes[i] = (byte)(i + 1);
SecretKeySpec km = new SecretKeySpec(kmBytes, "TripleDES");
byte[] cipherText = kwa.wrap(km);
kwa.init(Cipher.UNWRAP_MODE, kek);
Key k = kwa.unwrap(cipherText, "TripleDES", Cipher.SECRET_KEY);
// key-unwrap ALWAYS returns a parity-adjusted (proper!) key
TripleDES.adjustParity(kmBytes, 0);