It would not be illegal in many countries/states for both the job and jail scenarios depending on what crime you had committed.