The making of profit out of public moneys, or using the same for any purpose not authorized by law, by any public officer, shall be deemed a felony, and shall be punished as provided by law, but part of such punishment shall be disqualification to hold public office.