Cipher des = Cipher.getInstance("DES/CBC/PKCS#5"); des.initEncrypt(aliceAndBobSecretKey); byte[] encryptedMessage = des.crypt(aliceMessage);