created a util class and moved password encryption common methods to it