I'm not sure how laws like that help if an employer has access to information about past salary so they don't have to ask. There is an Equifax service that keeps track of past jobs to some extent. It isn't necessarily accurate or complete, but it exists - https://www.theworknumber.com/
It’s not legal to use in California after the bill becomes law.
(b) An employer shall not, orally or in writing, personally or through an agent, seek salary history information, including compensation and benefits, about an applicant for employment