yes its the same function... I've modified the code because you can't decrypt when the code has been converted to hex. Usage is included in the file: enc.txt;

//encrypt using single DES (with an 8 byte key) in CBC mode with the given input vector
string.DES ("8bytekey", 1, 1, "inputvec");
//encrypt using triple DES (with a 24 byte key) in ECB mode
string.DES ("this is a 24 byte key !!", 1);
//decrypt using single DES in ECB mode
string.DES ("8bytekey", 0);