// Create a new random TripleDESKey
final TripleDESKey key = new TripleDESKey();
// Create the encryption engine for encrypting the data
final TripleDESEncryptorEngine encryptionEngine =
new TripleDESEncryptorEngine(key);
// Due to the fact that in most cases the data that we are going to
// encrypt will not fit perfectly into the block length of a cipher,
// we want to use a padding algorithm to pad out the last block
// (if necessary). We are going to use PKCS5 to do the padding