South carolina constitution
Article XII: functions of government
Section 2

The General Assembly shall establish institutions for the confinement of all persons convicted of such crimes as may be designated by law, and shall provide for the custody, maintenance, health, welfare, education, and rehabilitation of the inmates.