Change sign function and check function in order to order parameters to create the same hash in every situation