How to implement TripleDES with DES algorithm is on the
Wiki.

[quote]

Therefore, Triple DES uses a "key bundle" that comprises three DES
keys, K<sub>1</sub>, K<sub>2</sub> and K<sub>3</sub>, each of 56 bits (excluding
parity bits). The encryption algorithm is:

- ciphertext = E<sub>K3</sub>(D<sub>K2</sub>(E<sub>K1</sub>(plaintext)))

[/quote]

Basically you just need to encrpyt the plaintext block 3 times with the keys provided.

Here's the code for encrypting data with DES.