So several iterations of md5 + salt is not secure? I'm really wondering how much time it takes to find a password hashed by 5 iterations of md5 + a salt by exhaustive search.
[1] http://www.win.tue.nl/hashclash/rogue-ca/
[2] http://blogs.technet.com/b/srd/archive/2012/06/06/more-infor...
[3] http://link.springer.com/chapter/10.1007%2F978-3-642-01001-9...
That said, don't roll your own. You probably screwed it up somewhere. Just use the bcrypt library call. Or scrypt to let you roll +2 against GPU attacks.