validate password on encrypt