A tough on crime bill passed by state legislators in the wake of a deadly train stabbing was signed into law by Gov. Josh Stein, his office said Friday.