The plant doesn't do it, you must do it by extracting the alkaloids first, and then transform them into salts by means of a diluted acid wash. Depending on which salt you want, you choose your acid, like HCl for chlorides, H2SO4 in alcoholic medium for sulfates, Acetic acid for acetates, etc.
Choice of the strength and kind of acid wash for any specific alkaloids should be found in literature first. LT/
WISDOMwillWIN