Triple DES as cryptographic hash function I need to generate a hash for a small piece of data (~50 bytes). I'd normally use MD5 or SHA but that's not available in the platform I'm programming for. 

Luckily, it provides Triple DES and I thought I could use it as cryptographic hash function (pseudo-code):

function MyHash(text)
    data = padded(text, 64)
    key = data[0:8] + data[8:16] + data[16:24]
    encrypted = TripleDES(data, key)
    return encrypted[0:16]


MyHash will produce 128-bit (16-bytes) long hashes for input text.

Is MyHash secure? How does it compare with MD5 and SHA-*?
It is not a secure hash. For example, it is easy to find collisions and second preimages for your hash function if the input is allowed to be longer than 24 bytes, because only the first three 64-bit blocks affect the output.

Additionally, it should not even work with a typical DES implementation. DES keys are 56 bits, encoded as 64-bit values where 8 bits are for parity. Arbitrary inputs will not produce a well formatted key.