It was secure enough right up until the point where you published your method on the Internet! This is because you were relying on security by obscurity, which is not a good idea.
You ought to use some sort of keyed hash function or MAC ideally, which incorporates a secret key known only to you.