N-halamine-based chitosan: preparation, characterization, and antimicrobial function.