First of all, there is no purpose for using a randomized number of rounds. This adds no additional security.
Secondly, it sounds like you are using this to validate passwords of users logging into your site. If that is what you are doing, then using a one way hash rather than encryption is the most secure way.