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.
MyHash secure? How does it compare with MD5 and SHA-*?