Refactored the methods into a HashPassword class

Refactored methods into a HashPassword class. This will allow for easier
code organization when using a OOP model in your projects.