I think it's better to use SHA-256 instead of md5. It's fast as well an there are no known collisions.